Reputation: 4318
I cant get the namespace system.runtime.caching to be recognized despite adding the reference. Based on research to similar problems, I've checked the target framework and all seems in order (currently 4.5.2).
Has anyone got a suggestion on how to solve this?
Upvotes: 1
Views: 107
Reputation:
Have you tried restarting Visual Studio? I added the reference and I was able to use it as a namespace.
Upvotes: 0
Reputation: 15982
Probably the problem is you are putting your code in App_Code
folder. Files in this folder are treated as content by default. You can solve this issue setting Build Action to Compile for .cs files in this folder.
However, you shouldn't use this folder for code, it will surely cause problems. I recommend you to move your code to another folder Infrastructure
or Code
.
Upvotes: 1
Reputation: 6473
I think you may have to add a reference to System.Core in your project. See these links, particularly the first one:
The type or namespace name 'Caching' does not exist in the namespace 'System.Runtime'
Upvotes: 0