与System.Web.Mvc版本冲突 [英] Version conflict with System.Web.Mvc

查看:571
本文介绍了与System.Web.Mvc版本冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我读的书ASP.NET MVC 5,弗里曼了,我创建了3个项目:

Now I read the book "ASP.NET MVC 5, Freeman", and I've created 3 projects:


  • SportsStore.Domain - 逻辑

  • SportsStore.UnitTests - 用于测试

  • SportsStore.WebUI - 为视图和控制器

使用的NuGet命令行我已经安装了很多包,像书:

Using NuGet command line I have install a lot of packages, like in the book:

INSTAL封装Microsoft.Aspnet.Mvc -version 5.0.0.0 -projectname SportsStore.Domain
。等等。

但是,我认为我有安装的东西错了,因为现在我有错误:

But I think that I have install something wrong, because now I have error:

打造SportsStore.WebUI,版本= 1.0.0.0,文化=中立,
  公钥=空使用System.Web.Mvc,版本= 5.2.2.0,
  文化=中性公钥=更高版本的31bf3856ad364e35
  比组装System.Web.Mvc,版本= 5.0.0.0,文化=中立,
  公钥= 31bf3856ad364e35,以其中提到
  做C:\\用户\\Дима\\文档\\ Visual Studio的
  2013 \\项目\\ SportsStore \\ SportsStore.WebUI \\ BIN \\ SportsStore.WebUI.dll SportsStore.UnitTests

Build "SportsStore.WebUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" use "System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" of the later version than the assembly "System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", to which reference is made c:\Users\Дима\Documents\Visual Studio 2013\Projects\SportsStore\SportsStore.WebUI\bin\SportsStore.WebUI.dll SportsStore.UnitTests

无法理解,如何解决呢

推荐答案

如果你知道如何读它在生成该错误消息解释清楚条款的问题。

The error message in the build explains the problem in clear terms if you know how to read it.

它首先告诉你,在WebUI项目使用5.2.2.0:

It starts by telling you that the WebUI project uses 5.2.2.0:

SportsStore.WebUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null use System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

然后,它会告诉你,你的项目之一是引用不同的版本:

Then it tells you that one of your projects is referencing a different version:

later version than the assembly System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

既然你在,你在你的领域工程安装5.0.0.0你的问题说,你需要从项目中删除该版本,并安装正确的版本(在本例中5.2.2.0)

Since you stated in your question that you installed 5.0.0.0 in your domain project, you will need to remove that version from the project, and install the correct version (in this case 5.2.2.0)

这篇关于与System.Web.Mvc版本冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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