Welcome to the navigation

Adipisicing in lorem aute amet, nisi proident, anim tempor ea ullamco fugiat ut esse quis exercitation ad id duis in do laboris sunt aliquip officia. Exercitation do sit in labore sint mollit quis amet, aliqua, nostrud esse ut anim veniam, ad dolore elit, cupidatat deserunt officia excepteur culpa consectetur consequat

Yeah, this will be replaced... But please enjoy the search!

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

Categories Tags

So you got the "Failure adding assembly to the cache: This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded." when running Gacutil.

Well good news is that this is easy to fix, you are simply executing an old version of gacutil. It is quite common in development environments to have multiple versions of gacutil, befin by finding out which one you currently are using. Open PowerShell and enter

(Get-Command "gacutil.exe").Path

 

Figuring out what's available

To find any installed versions of Gacutil the command below may help you

# Find all gacutil.exe's in the 'C:\Program Files (x86)' folder
(Get-ChildItem -Path 'C:\Program Files (x86)' -Filter gacutil.exe -Recurse) | Select-Object { $_.FullName }

Most of my machines this will return something similiar like below

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\gacutil.exe 
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe

Either execute the appropriate version of Gacutil from it's directory or link that directory to the environment path.

Please note that this portal is a BETA site , I will continuously improve all functionality and performance during the coming weeks / the author