ASP.NET MVC4解决失败安装KB2993928后建 [英] ASP.NET MVC4 solution fails to build after installing KB2993928

查看:1107
本文介绍了ASP.NET MVC4解决失败安装KB2993928后建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一对夫妇引用已经建立,现在没有问题了约2年的ASP.NET MVC 4解决方案。但是,安装后 KB2993928 并的 KB2993937 今天上午,我们不能对我们的Windows 7机器这个解决方案运行的FxCop了。

We have an ASP.NET MVC 4 solution with a couple of references that has been building without problems for about 2 years now. However, after installing KB2993928 and KB2993937 this morning, we cannot run FxCop on this solution on our Windows 7 machines anymore.

我有一种感觉,这是因为该更新改变了System.Web.Mvc装配在GAC DLL版本。这是因为在GAC我目前可以找到3个不同的System.Web.Mvc的DLL,所有今天更新它们。

I have a feeling this is because this update changed the DLL version of the System.Web.Mvc assembly in the GAC. This is because in the GAC I can currently find 3 different System.Web.Mvc DLLs, which are all updated today.

我们在构建收到的错误是:

The error we receive in the build is as follows:

6>MSBUILD : error : CA0001 : The following error was encountered while reading module 'FrontEnd.Implementation': Assembly reference cannot be resolved: System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. [C:\Project\FrontEnd\02-Implementation\02-Implementation.csproj]
6>MSBUILD : error : CA0058 : The referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be found. This assembly is required for analysis and was referenced by: S:\Deliverables\FrontEnd\bin\FrontEnd.Implementation.dll. [C:\Project\FrontEnd\02-Implementation\02-Implementation.csproj]

由于我们使用ASP.NET MVC 4,本次3.0版本的DLL间接地通过我们的参考之一引用。例如,RazorGenerator引用版本3.0.0.0。可能还有其他。有RazorGenerator从我可以告诉没有新的版本。

Since we use ASP.NET MVC 4, this version 3.0 DLL is referenced indirectly by one of our references. For instance, RazorGenerator references version 3.0.0.0. Possibly others as well. There is no new version of RazorGenerator from what I can tell.

在System.Web.Mvc版本我在GAC看到的是:3.0.50813.1,4.0.40804.0和5.0.20821.0

The System.Web.Mvc versions I see in the GAC are: 3.0.50813.1, 4.0.40804.0 and 5.0.20821.0.

我从我们的项目中删除的参考System.Web.Mvc,并添加的mvc作为的NuGet包来代替。这解决我们的编辑,但FxCop的仍然不因间接引用的工作。

I removed the reference to System.Web.Mvc from our projects and added Mvc as a NuGet package instead. This fixes our compilation, but FxCop still doesn't work due to the indirect references.

如果需要任何额外的信息,请让我知道。

If any additional information is required please let me know.

推荐答案

如果这个问题被引用这反过来又对这些特定组件的依赖造成的,您可以通过强迫的FxCop只使用强名称弥补这一点,并忽略版本数。此溶液被描述<​​一href=\"http://www.paraesthesia.com/archive/2011/04/20/how-to-pass-parameters-to-fxcop-from-visual-studio-or.aspx/.\"相对=nofollow>这里。

If this issue is caused by references which in turn have dependencies on those specific assemblies, you can remedy this by coercing FxCop to use only the StrongName and ignore the version number. This solution is described here.

当然,真正的解决办法是更新引用的程序集(与间接依赖)到较新的版本。

Of course the real solution would be to update the referenced assemblies (with the indirect dependencies) to newer versions.

这篇关于ASP.NET MVC4解决失败安装KB2993928后建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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