简体   繁体   中英

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 . 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 .

I'm using MVC4 in VS2010.

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

I also get the following warning:

Warning 2 Found conflicts between different versions of the same dependent assembly. MVCMusicStore

I removed the MvcMailer reference and added it again, but it didn't resolve the issue.

Help would be much appreciated.

I'm using Mvc 4, and was installing MvcMailer via the package manager with the following:

install-package MvcMailer

Because I'm using Mvc 4, the following should be used:

install-package MvcMailer3

This has resolved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM