0

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.

EDIT:

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.

rg89
  • 143
  • 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

1 Answers1

1

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?

Greg Askew
  • 36,724
MichelZ
  • 11,138