Coffeehouse Thread

27 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Where is GACUTIL?

Back to Forum: Coffeehouse
  • User profile image
    KeyboardG

    Of course, I was referring to this. Don't worry I wrote it myself last night.

    brockweaver wrote:
    Just fyi, the only thing I could get to work in my situation (auto-install .NET 2.0 assemblies via an ActiveX control on a web page) was to write a little exe myself that calls into the System.EnterpriseServices.Internal.Publish object methods to install into the GAC and register it for interop.  I could have used regasm to do the COM portion, but since some people do not have the 2.0 runtime in their path (and I didn't want to hard code it in the .inf file), I just did it through the exe.


    If anybody wants details, I'd be happy to post them.  It took me a good 3 hours to get everything working as it should, and I see no reason for anyone to go through the same pains I did!

  • User profile image
    JChung2006

    Good.   Maybe you can post how you did it then?

  • User profile image
    jerrydrake

    brockweaver said:
    Just fyi, the only thing I could get to work in my situation (auto-install .NET 2.0 assemblies via an ActiveX control on a web page) was to write a little exe myself that calls into the System.EnterpriseServices.Internal.Publish object methods to install into the GAC and register it for interop.  I could have used regasm to do the COM portion, but since some people do not have the 2.0 runtime in their path (and I didn't want to hard code it in the .inf file), I just did it through the exe.


    If anybody wants details, I'd be happy to post them.  It took me a good 3 hours to get everything working as it should, and I see no reason for anyone to go through the same pains I did!
    Hi,
        I read your notes. I'd like to have the details you have for this problem if possible. I'm trying to distribute a tlb obtained from a 2.0 framework dll, but I have several registration problems. I made an msi project in which I added all the needed libraries, but after the client installation I keep having "ActiveX can't create object", to be honest I made several test but I can't solve the problem.

    Kind regards


    You wrote:
    --------------
    ust fyi, the only thing I could get to work in my situation (auto-install .NET 2.0 assemblies via an ActiveX control on a web page) was to write a little exe myself that calls into the System.EnterpriseServices.Internal.Publish object methods to install into the GAC and register it for interop.  I could have used regasm to do the COM portion, but since some people do not have the 2.0 runtime in their path (and I didn't want to hard code it in the .inf file), I just did it through the exe.


    If anybody wants details, I'd be happy to post them.  It took me a good 3 hours to get everything working as it should, and I see no reason for anyone to go through the same pains I did!

  • User profile image
    grafiky

    Yggdrasil said:
    Rossj wrote:
    Help - I've lost it.  I installed a .Net 2.0 runtime today and it didn't install gacutil ... anyone know..

    a. Why?
    b. Where I can find it ...


    a. GACUTIL doesn't come with the .NET Runtime, but with the .NET SDK - also a free download, but not part of the basic redistributable. The SDK is installed with Visual Studio, so development machines always have it.

    Yes, this sucks big-time. And no, there aren't any managed APIs that can register/unregister things in the GAC. GACUTIL binds to unmanaged functions.

    I'm guessing you need this for deployment? There are several ways to go about it:
    1) Bundle GACUTIL.EXE with your installation package.
    2) Install in the GAC by copying your DLL into C:\WINDOWS\Assembly. This isn't a perfect solution - I'm pretty sure only copying from Windows Explorer does the trick, and other methods may not work.
    3) Install in GAC using your MSI Installer of choice - the built in Visual Studio Installer project can install assemblies in the GAC simply by adding a Global Assembly Cache folder as part of the destination filesystem.

    If you need GACUTIL for other purposes - cleaning the Download Cache or whatnot - you'll have to find alternate ways of doing it. Sad
    I have installed Visual Studio 2008 but I cannot find "gacutil.exe"... you said that is included, is it? If yes, why a can't find it, if yes, whick exactly .NET SDK I should install? I'm begginer as you can see. Thank you very much for your help.

  • User profile image
    DCMonkey

    grafiky said:
    Yggdrasil said:
    *snip*
    I have installed Visual Studio 2008 but I cannot find "gacutil.exe"... you said that is included, is it? If yes, why a can't find it, if yes, whick exactly .NET SDK I should install? I'm begginer as you can see. Thank you very much for your help.
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

    If its not there, maybe you had a problem similar to this guy:

    http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/006edcd4-888d-4b95-8454-9651dc298390/

  • User profile image
    grafiky

    DCMonkey said:
    grafiky said:
    *snip*
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

    If its not there, maybe you had a problem similar to this guy:

    http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/006edcd4-888d-4b95-8454-9651dc298390/

    Thank you very much! I will try then...

  • User profile image
    Maddus Mattus

    grafiky said:
    DCMonkey said:
    *snip*
    Thank you very much! I will try then...
    Look under "Visual Studio Tools" in your start menu -> Visual Studio,..

    There should be something like visual studio command prompt,..
    If you start that, GACUTIL get's added to the path and is availible as a command.

  • User profile image
    grafiky

    Maddus Mattus said:
    grafiky said:
    *snip*
    Look under "Visual Studio Tools" in your start menu -> Visual Studio,..

    There should be something like visual studio command prompt,..
    If you start that, GACUTIL get's added to the path and is availible as a command.
    Thank you for the answer. But the fact is that it isn't. After searching I have found that something is wrong with the installation of Visual Studio so I'm uninstalling now and in one hour I will know if is there where you say Big Smile
    Thanks

  • User profile image
    grafiky

    I'm a really beginner but I'm going to tell you my expirence with this. Because yesterday I was asking my self (and to a lot of people to Big Smile) the same: "where is the gacutil.exe?

    This firs is that in a correct installation of Visual Studio this utility is in "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin", you also can use it with the "Visual Studio Command Promnt" from "Visual Studio Tools". IF IS NOT THERE, be sure that your installation is not correct.

    What I did?

    1.- Uninstall Visual Studio with this tool (or follow the instruction): http://msdn.microsoft.com/en-us/vstudio/bb968856.aspx
    2.- Uninstall .NET Framework (all version) with this tool: http://blogs.msdn.com/astebner/pages/8904493.aspx
    3.- Read the Visual Studio Readme before installing againg. The are some notes like desactivate windows update during instalation that are very recommended.
    4.- Install Visual Studio

    Now I have the util!

    If you want to try other solution maybe this is useful:

    http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/006edcd4-888d-4b95-8454-9651dc298390/

    Thanks to DCMonkey and Maddus Mattus for they comments.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.