+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Global Assembly Cache (GAC)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Unregistered Guest

    Default Global Assembly Cache (GAC)

    What are the best practices for installing into the GAC on target machine?

    My program uses some 3rd party UI libraries. They all install into the GAC on my development machine. Should I do the same on the target machine, or would I be better off just putting them into the application folder?

    If I do install into the GAC, what options should I check on the file details dialog. Obviously the checkbox ".NET assembly", but I mean what about uninstall? Register as shared file? Replacement options?

  2. #2
    Unregistered Guest

    Default Re: Global Assembly Cache (GAC)

    Uh-oh. I checked the .NET assembly checkbox but the assemblies don't get installed into the GAC. They do get copied into the folder I specify, which I just made up because I thought they would go into the GAC and not be copied into some folder. In Wise, there is a actually a target "folder" named GAC. Just copy files into that.

    When I run the program, I get some kind of .NET error about bad image, for one of the assemblies that should be in the GAC (but isn't - I just copied to application folder after the install to see if it would work).

    This is getting a little nightmare-ish now.

  3. #3
    Unregistered Guest

    Default Re: Global Assembly Cache (GAC)

    OK this time I just gave up on the GAC and put those assemblies into the application folder in SetupBuilder, and then recompiled. Same error:

    System.BadImageFormatException

    I'm no expert on .NET assemblies and the GAC, but the answer to my earlier question about where to install these assemblies that come from my GAC, would appear to be, they are expected to be in GAC on the target computer.

    This is so not going well.

  4. #4
    Unregistered Guest

    Default Re: Global Assembly Cache (GAC)

    Well now I feel a little stupid. I was putting in the wrong assemblies for my application. I was adding the VS 2005 versions. I got confused by the vendor's numbering system for internal version numbers. Never mind!

    OK, but there is still a problem. Setupbuilder is copying these assemblies to the GAC. But it's also copying them to the applictation folder. Why?

    Seems like what Wise did here was best and have a built-in folder "GAC" and if you drop an assembly there, that's where it goes.

    Also it would be nice if the setup program had given an error at runtime when it tried to install a 2.0 assembly to the 1.1 framework GAC.

  5. #5

    Default Re: Global Assembly Cache (GAC)

    Hello,

    I am not a .NET expert, but did you check for the .NET Framework version on the destination machine?

    Andrew

  6. #6
    Unregistered Guest

    Default Re: Global Assembly Cache (GAC)

    Quote Originally Posted by Andrew McKay
    Hello,

    I am not a .NET expert, but did you check for the .NET Framework version on the destination machine?

    Andrew
    As I said, Setupbuilder is now copying these assemblies to the GAC.

    But it's also copying them to the applictation folder. Why? They only need to be put in the GAC. It's a bit funky.

  7. #7

    Default Re: Global Assembly Cache (GAC)

    I thought GAC is only a set of registry entries. I had no idea it's a "physical location".

    Just curious. So the files should not be in the Application Folder? Only in the "GAC"? I am learning .NET now.

    Andrew

  8. #8
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Global Assembly Cache (GAC)

    Hello,

    Item in review.

    Thanks,

  9. #9
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Global Assembly Cache (GAC)

    Hello,

    Just to be on the safe side. Install assemblies to the Global Assembly Cache works (and you can execute your application). The "only" problem is that SetupBuilder installs it into the GAC and the application folder, correct?

    Thank you for your time.

  10. #10
    Unregistered Guest

    Default Re: Global Assembly Cache (GAC)

    Quote Originally Posted by linder
    Hello,

    Just to be on the safe side. Install assemblies to the Global Assembly Cache works (and you can execute your application). The "only" problem is that SetupBuilder installs it into the GAC and the application folder, correct?

    Thank you for your time.
    That's correct, and sorry for the confusion in the initial post.

    This is a minor problem, I guess you could say, but certainly strikes me as pretty funky. If I want to install an assembly to the GAC, why should I create a target folder, to which Setupbuilder also installs the same file?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. .NET assembly
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 2
    Last Post: 07-13-2006, 07:05 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •