[英]Won't compile after installing: Mcv.Mailer version 1.0 uses Mvc version 4.0, which has higher version than referenced assembly Mvc version 3.0
I installed the nuget package for MvcMailer, found here . 我安装了MvcMailer的nuget包,在此处找到。 Although it didn't (as it says in the tutorial it will) add smtp configuration to web.config, I found the correct smtp configuration here .
尽管它没有(如本教程中所说的那样)将smtp配置添加到web.config,但我在这里找到了正确的smtp配置。
I'm using MVC4 in VS2010. 我在VS2010中使用MVC4。
When I compile, I get the following error in the the error list: 编译时,我在错误列表中得到以下错误:
Error 1 Assembly 'Mvc.Mailer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\\Users\\Home\\Desktop\\MVCMusicStore - Copy\\packages\\MvcMailer.4.0\\lib\\40\\Mvc.Mailer.dll MVCMusicStore
错误1程序集'Mvc.Mailer,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'使用'System.Web.Mvc,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'具有更高的版本引用的程序集'System.Web.Mvc,版本= 3.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'c:\\ Users \\ Home \\ Desktop \\ MVCMusicStore-Copy \\ packages \\ MvcMailer.4.0 \\ lib \\ 40 \\ Mvc.Mailer。 dll MVCMusicStore
I also get the following warning: 我还会收到以下警告:
Warning 2 Found conflicts between different versions of the same dependent assembly.
警告2发现相同从属程序集的不同版本之间存在冲突。 MVCMusicStore
MVCMusicStore
I removed the MvcMailer reference and added it again, but it didn't resolve the issue. 我删除了MvcMailer参考,并再次添加了它,但是它不能解决问题。
Help would be much appreciated. 帮助将不胜感激。
I'm using Mvc 4, and was installing MvcMailer via the package manager with the following: 我正在使用Mvc 4,并且正在通过软件包管理器安装MvcMailer,并具有以下内容:
install-package MvcMailer
Because I'm using Mvc 4, the following should be used: 由于我使用的是Mvc 4,因此应使用以下内容:
install-package MvcMailer3
This has resolved the issue. 这样就解决了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.