类型或名称空间名称"Caching"在名称空间"System.Runtime"中不存在 [英] The type or namespace name 'Caching' does not exist in the namespace 'System.Runtime'

查看:108
本文介绍了类型或名称空间名称"Caching"在名称空间"System.Runtime"中不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道通常对此有一个简单的解决方案,即在添加引用中引用dll.但是我已经添加了参考,并且system.runtime.caching出现在我的参考列表中,但错误仍然显示.

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.

我已删除并重新添加了引用,但仍然没有运气.我已经重新启动VS 2012并重新启动.

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

Visual Studio 2012 .net framework 4.5

屏幕截图:

推荐答案

我遇到了同样的问题,并且发现必须手动添加:

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>

到我的 web.config 文件.

这篇关于类型或名称空间名称"Caching"在名称空间"System.Runtime"中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆