asp.net-mvc-4 – 在VS2012中运行代码分析时出错

前端之家收集整理的这篇文章主要介绍了asp.net-mvc-4 – 在VS2012中运行代码分析时出错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我尝试编译MVC4 Web项目时收到以下两个错误

CA0058 Error Running Code Analysis CA0058 : The referenced assembly ‘DotNetOpenAuth.AspNet,Version=4.0.0.0,Culture=neutral,PublicKeyToken=2780ccd10d57b246’ could not be found. This assembly is required for analysis and was referenced by: C:\Users\bflynn\Visual Studio Sites\mnp\bin\mnp.dll,C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\Microsoft.Web.WebPages.OAuth.dll. [Errors and Warnings] (Global)

CA0001 Error Running Code Analysis CA0001 : The following error was encountered while reading module ‘Microsoft.Web.WebPages.OAuth’: Assembly reference cannot be resolved: DotNetOpenAuth.AspNet,PublicKeyToken=2780ccd10d57b246. [Errors and Warnings] (Global)

我最近将DotNetOpenAuth.AspNet软件包添加到应用程序中,它似乎与此相关.我已经清理,重建,打开/关闭程序,卸载/重新安装包,但错误仍然存​​在.

解决方法

我也碰到了这个.

不要将DOA升级到4.1

看起来aspnet dll引用了特定版本.尽管它的.nuspec文件说4.0可以……

解:

Uninstall-Package -Force每个DotNetOpenAuth包(core / aspnet / oauth / openid等)

安装包DotNetOpenAuth.AspNet -Version 4.0.4.12182

猜你在找的asp.Net相关文章