1
votes

I am using mvc 4 asp.net.

I have used postal.dll package from NuGet to send emails from my application.

But I get error on build that mvc assembly version postal is using is higher than referenced by my project. How do I resolve this? please help

I am using Visual studio 2012 mvc4

Thanks

Error:

Error 1 Assembly 'Postal, Version=0.9.2.0, Culture=neutral, PublicKeyToken=45719375b8b4d528' uses 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Users\xxxx\Documents\Visual Studio 2012\Projects\MyProject\packages\postal.0.9.2\lib\net40\Postal.dll MyProject

2

2 Answers

0
votes

What your message is telling you is that Postal, Version=0.9.2.0, works with version System.Web.Mvc, Version=5.1.0.0, but you gave it System.Web.Mvc, Version=4.0.0.0 so it broke.

If you have two different assembly versions you might want to do binding redirect

<bindingRedirect  
   oldVersion="existing assembly version"
   newVersion="new assembly version"/>

Other option would be to use System.Web.Mvc, Version=5.1.0.0 across your solution.

0
votes

You could try to use an older version of Postal, assuming it satisfies your requirements.

Install-Package postal -Version 0.9.0