注册 | 登录 mvc - Postal for ASP MVC 4 wants me to use MVC 5

itPublisher 分享于



推荐:ASP.NET MVC (一)

从零开始学习ASP.NET MVC:开天辟地入门篇(一) 2009-2-27 20:11:26 已被阅读:1151 发表评论 一.摘要 和自身水平有关, 我总喜欢写入门级别的文章.比如虽然做项目

I just installed postal for ASP MVC with NuGet and tried compiling it after I set up some code to send an email. I was given an error that is telling me I need to use MVC version 5.1 for Postal version 0.9.2. My MVC project is a MVC 4 project type that uses .net 4.5 and I'm in VS 2013 Pro. Is there a way to configure this differently to get it to work?

Here is my error message

Error 2 Assembly 'Postal, Version=, Culture=neutral, PublicKeyToken=45719375b8b4d528' uses 'System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\TFS\OULUVU\OULUVU\packages\postal.0.9.2\lib\net40\Postal.dll OULUVU

There was a warning with it that says

Warning 1 Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. OULUVU postal
  this question
asked Jun 14 '14 at 19:19 user1186050 1,437 3 21 53      as soon as I add the using statement 'using postal' in my cs file I get the error. –  user1186050 Jun 14 '14 at 20:43      I got it to work by uninstalling postal 0.9.2 and installing 0.8.2, not shure why this works but some compatibility issue. If anyone knows how to get 0.9.2 working in VS 2013 MVC4 let me know! –  user1186050 Jun 14 '14 at 20:47      Why not upgrade to MVC5? –  Erik Funkenbusch Jun 14 '14 at 21:38      can I do that without creating a new project? Is there a way to upgrade my MVC4 project to 5? –  user1186050 Jun 14 '14 at 22:54      Of course you can. Although there is a bit of a process to it. See… –  Erik Funkenbusch Jun 14 '14 at 22:57  |  show more comment

2 Answers

There are now specific nuget packages for each version of MVC. So, for example, install Postal.Mvc4

  this answer
answered Jul 14 '14 at 12:58 Andrew Davey 3,117 1 31 53


I posted an issue on the authors github page. Its not really his fault. Its Visual Studio that goes ahead and downloads the latest dependencies without asking and screws everything up.


  ASP.NET MVC Html.Action() ASP.NET MVC Html.TextBox 与 Html.TextBoxFor 区别 For支持强类型(model的类型),内部

The Author did say he retracted Postal.MVC form Nuget and has now split them up for each version.

Luckily I was only testing today but I had to delete the project, copy everything over and explicitly install Postal MVC4 - Works great.

  this answer
answered Jul 14 '14 at 12:58 ppumkin 5,372 5 29 51



从ASP.NET Web Form到ASP.NET MVC,我们感到既熟悉又陌生。它是ASP.NET Web Form的一个增强,一个替代,还是一个替补?我们做Web开发两者都需要了解掌握吗……  








您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱