postal icon indicating copy to clipboard operation
postal copied to clipboard

Issue with MVC 5.2

Open ghost opened this issue 9 years ago • 6 comments

Hey Andrew,

Our project is using Postal 1.0.0.0 for MVC5 and since updating to System.Web.Mvc 5.2, it all stopped working. This is in my assembly binding Fusion log:

=== Pre-bind state information ===
LOG: DisplayName = System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
 (Fully-specified)
LOG: Appbase = file:///E:/approot/bin
LOG: Initial PrivatePath = E:\approot\bin
Calling assembly : Postal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=45719375b8b4d528.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\base\x64\WaIISHost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from D:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///E:/approot/bin/System.Web.Mvc.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

I have my binding redirects setup correctly under my web.config:

<dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>

No other components have this issue except for Postal. I noticed the dependency for Postal for MVC5 is >= 5.1.2, so 5.2 should be working, but Postal is somehow requiring 5.1.x.x specifically.

Any ideas?

ghost avatar Aug 27 '14 18:08 ghost

Is Postal's reference to MVC incorrect? The following is copied from Postal.Mvc5.csproj:

<Reference Include="System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
    <HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.1.2\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>

SpecificVersion is false! Perhaps I'm misunderstanding something here. Do I really have to release a new version of Postal for every minor update to MVC?

andrewdavey avatar Aug 28 '14 08:08 andrewdavey

I had the same problem today. I still haven't figured it out. But it only happens when there a class that inherits from Email (ie, a "Strongly Typed Email") is in my project. I tried creating a new sample project to re-create the issue, but so far no luck. I started out with Postal 1.0, but I'm currently on the latest release.

Ghost, were you using strongly typed emails by any chance? And did you ever work this out?

Pharylon avatar Dec 29 '14 21:12 Pharylon

I am having issues with Postal as well after upgrading Razor to 3.2.2 and MVC to 5.2.2

SamJongenelen avatar Dec 30 '14 12:12 SamJongenelen

I ran into the same issue using a class that inherits from Email. After trying a plethora of fixes, switching the build config from using Visual Studio 2012 to 2013 resolved the issue.

idspeer avatar Jul 02 '15 18:07 idspeer

i'm having the same problem. i have postal running in a service. strongly type. i have mvc 5.2.3 in this project and i can not use @Html.Raw() to decode my html @Model.Message. i've tried Reference Including 5.1.0.0 but this caused more problems by only resolving by nuget downgrading and upgrading my mvc. postal is a great project. but can you please resolve this problem?

curlyfro avatar Sep 17 '15 00:09 curlyfro

Postal stopped development?

quedicesebas avatar Oct 28 '15 17:10 quedicesebas