Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The type or namespace name 'Caching' does not exist in the namespace 'System.Runtime'

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:

Screen shot

like image 698
user1809104 Avatar asked Jan 07 '13 16:01

user1809104


People also ask

What is runtime caching?

Runtime caching refers to gradually adding responses to a cache "as you go". While runtime caching doesn't help with the reliability of the current request, it can help make future requests for the same URL more reliable.

What is the namespace for caching information in net?

There are two namespaces containing ASP.NET caching classes: System. Web and System. Web.

What is Memorycache C#?

In-Memory Cache is used for when you want to implement cache in a single process. When the process dies, the cache dies with it. If you're running the same process on several servers, you will have a separate cache for each server. Persistent in-process Cache is when you back up your cache outside of process memory.


1 Answers

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.

like image 124
Liknes Avatar answered Sep 19 '22 08:09

Liknes