andrewdavey / postal

Email sending for asp.net mvc using the view engine system to render emails.
http://aboutcode.net/postal
MIT License
536 stars 168 forks source link

Why the upper limit on the RazorEngine dependency for MVC4? #79

Closed jslaybaugh closed 10 years ago

jslaybaugh commented 10 years ago

Andrew, we've been stuck in our own little DLL Hell for the last couple days and we've ultimately tracked it down to the older version of Postal we were using (0.8.2) but unfortunately upgrading to 1.0 caused a new situation. Here was our setup:

It had been running fine for months, but last week, we added another library and things got hairy. We were getting that good old Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) error where MVC3 was conflicting with MVC4. Anyway, after several days of trying to track down what was doing what, the old Postal we were using was referencing MVC3. We went to use the new nuget package here http://www.nuget.org/packages/Postal.Mvc4/ but then we had a problem because it requires less than v3 of RazorEngine. We ended up cloning the Postal repo and building ourselves to include the dll and everything seems fine. Our MVC conflict is gone.

My question is why did you put the upper limit on the MVC4 Nuget Package to not allow v3 of RazorEngine. I've been using 3.2.0 of RazorEngine alongside 0.8.2 of Postal for almost a year in our production MVC4 app, so I don't know why v1 of Postal would say it can't use it. On the MVC5 package, it allows it. Is there something I'm missing or can you perhaps change the Nuget package so we can go back to using Postal via Nuget instead of our own build?

andrewdavey commented 10 years ago

There's a good chance I screwed the dependency version numbers when fighting to get MVC 3, 4 and 5 working. If someone would like to open a pull request that fixes all this, then I'd be happy to merge.

andrewdavey commented 10 years ago

Please try v1.1.0