Reputation: 717
I know there is usually a simple solution to this which is reference the dll in add references. But I have added the reference and system.runtime.caching appears in my references list but the error still displays.
The error displays in the browser in runtime so it does compile.
I have removed and re added the reference but still no luck. I have restarted VS 2012 and restarted.
Visual Studio 2012 .net framework 4.5
Screen shot:
Upvotes: 17
Views: 12230
Reputation: 1
Go to Solution Explorer, right-click on References and "Add Reference." Select "Assemblies", if it's not already highlighted, and start searching for "System.Runtime.Cashing". Before you finish typing you should see it listed.
Check the box to the left and click ok.
Upvotes: -1
Reputation: 195
I had the same issue, and I found out that I manually had to add:
<assemblies>
<add assembly="System.Runtime.Caching, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
to my web.config
file.
Upvotes: 4
Reputation: 33
I had a similar issue and it went away when I changed the target framework of the from .NET Framework 4 Client Profile to .Net Framework 4
Upvotes: 0
Reputation: 44941
The most likely cause of this error is that you are using a Client Profile version of the .Net framework.
Upvotes: 0