GacUtil gives this error: “This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.”

This happens when you run an old .NET Framework 2.0 version of gacutil.exe against an assembly built with Framework 4.0.
Make sure you find and use the correct and latest version of GacUtil (you can see the disk path below).

NOTE: You can add a post-build event so that a .DLL is automatically GAC’ed each time you do a build:
“C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools&\gacutil” /i “$(TargetPath)”

Uncategorized  

Leave a Reply