My gacutil (vs2010 4.0) does not seem to be working

cavillac picture cavillac · Apr 17, 2012 · Viewed 7k times · Source

I recently started making my first GAC Assembly for 4.0 from scratch and when I went to install it I got this: Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1 Copyright (c) Microsoft Corporation. All rights reserved.

Failure adding assembly to the cache: This assembly is built by a runtime newe r than the currently loaded runtime and cannot be loaded.

So I found the location of the 4.0 GacUtil (C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools) and overwrote the exe and its config to the versions from there. I went and ran the the /i on my new Assembly once more and just got: Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.

But there was no trace of the Assembly in c:\windows\Assembly. I assumed I was doing something wrong and tried to run a gacutil /? to see other options I could try (and to see why no output was being displayed when I was installing the Assembly) but it just kept outputting the same thing: Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.

To make sure I wasn't losing my mind, I copied back the old gacutil.exe I had been using and did the /? and it loaded the help info for the command. Put the new gacutil back and tried again and still no output.

Is there something I'm doing wrong or missed when going to use this new 4.0 gacutil?

Note: the assembly doesn't show up in Windows\Microsoft.NET\Assemblies either.

Answer

cavillac picture cavillac · Apr 17, 2012

If you are copying gacutil.exe out of its original location then there is a 1033/gacutlrc.dll file that needs to be copied with it. Once I copied that file into the new location gacutil seemed to work fine.