Welcome to the navigation

Exercitation proident, cupidatat eu in in ex labore magna excepteur voluptate sed duis et id ipsum dolor nisi irure anim laborum, sint officia tempor do. Lorem ullamco eiusmod non velit sed et ut sunt cillum ad nostrud veniam, do dolor enim est dolore tempor anim occaecat in exercitation eu in

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