Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I built a DLL on my 64bit Windows 7 machine in Visual Studio 2010. The project is a class library. I copied the whole project folder to our 64 bit Windows 2008 Server Web to try and make the library accessible to ASP classic websites we have running on the server.

The server has the 4.0 .NET framework installed. This command:

C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin>gacutil /i c:\portalClasses\portalClasses\bin\debug\portalClasses.dll

Produces this result:

This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

I would love to know what I've done incorrectly. Thanks for reading.


Per comments from @brentpabst below, I tried the drag and drop method into C:\windows\assembly. After a short hour glass, this command gacutil -l > gac.txt produces a text file that does not contain my assembly.

share|improve this question
Two things. 1) You can drag and drop DLLs into the C:\Windows\assembly folder, no need for cmd line if you don't want. 2) Are you sure the server is running x64 and the .NET framework versions are actually equal to that of your dev box? – Brent Pabst Jul 13 '12 at 20:25
@BrentPabst I tried dragging the DLL into that folder, but it doesn't seem like anything happened. Should I be able to see it in there? – rg89 Jul 13 '12 at 20:32
@BrentPabst All the Application Pools in IIS show v4.0, and when I right click My Computer and choose Properties it says 64-bit operating system next to System type. – rg89 Jul 13 '12 at 20:40
Are you sure you built the assembly for x64 and not x86? – Brent Pabst Jul 13 '12 at 22:51
@BrentPabst I am sure my target platform is x64. I even ran corflags.exe on the DLL and the 32BIT flag is not set. When I drag this DLL to the C:\windows\assembly folder on the server, I get an hour glass for a moment. I never see any item in the directory listing afterwards. – rg89 Jul 16 '12 at 13:56
up vote 1 down vote accepted

The gacutil.exe in C:\Program Files\Microsoft SDKs\Windows\v7.1\Binis actually for .NET below 4.0.

The 4.0 version should be in C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools

Could you try this one?

share|improve this answer
I found other references to this NETFX 4.0 folder, but my machine doesn't have the directory. Let me run through the install again to make sure it was a full one. – rg89 Jul 16 '12 at 14:47
Make sure you grab the Windows SDK for Windows & .NET 4: Microsoft Windows SDK for Windows 7 and .NET Framework 4 – MichelZ Jul 16 '12 at 14:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.