MvcMailer icon indicating copy to clipboard operation
MvcMailer copied to clipboard

Support multiple .NET versions in the NuGet package

Open jrummell opened this issue 11 years ago • 5 comments

The latest version of MvcMailer is compiled under .NET 4.5, so it can't be added to .NET 4.0 projects. It is possible to include framework specific versions of a library in a single package. See http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Supporting_Multiple_.NET_Framework_Versions_and_Profiles

Another option would be to create a separate MvcMailer4 package for .NET 4.0. I had to install the 4.0 version of MvcMailer from the command line in my .NET 4.0 project.

Install-Package MvcMailer -Version 4.0

jrummell avatar Apr 08 '13 18:04 jrummell

Please download v4.0 of MvcMailer. It's possible to supply separate binaries for target versions, but the code gets a bit messy with dupes. Hope this helps. — Sent from Mailbox for iPhone

On Mon, Apr 8, 2013 at 12:25 PM, John Rummell [email protected] wrote:

The latest version of MvcMailer is compiled under .NET 4.5, so it can't be added to .NET 4.0 projects. It is possible to include framework specific versions of a library in a single package. See http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#Supporting_Multiple_.NET_Framework_Versions_and_Profiles Another option would be to create a separate MvcMailer4 package for .NET 4.0. I had to install the 4.0 version of MvcMailer from the command line in my .NET 4.0 project.

Install-Package MvcMailer -Version 4.0

Reply to this email directly or view it on GitHub: https://github.com/smsohan/MvcMailer/issues/94

smsohan avatar Apr 09 '13 01:04 smsohan

Hi @smsohan I've just been looking at the differences between version 4.5 and 4.0, and the changes to MvcMailMessage.SendAsync can be achieved without upgrading to .NET 4.5 and using async.

If you're happy to take it I'll send a pull request with the change and with the project downgraded to .NET 4 again.

JSkimming avatar Jun 20 '13 20:06 JSkimming

We gave it a shot and encountered issues, hence the upgrade. Either way, for people using 4.5, it makes sense to use the newer async/await API. For 4.0 users, we released MvcMailer 4.

Sohan http://smsohan.com skype:smsohan | gtalk:sohan39 | cell: 403-714-2673

On Thu, Jun 20, 2013 at 2:25 PM, James Skimming [email protected]:

Hi @smsohan https://github.com/smsohan I've just been looking at the differences between version 4.5 and 4.0, and the changes to MvcMailMessage.SendAsynchttps://github.com/smsohan/MvcMailer/blob/1a90444a86ba08610a3e85bc6fe62d1a94e1a562/Mvc.Mailer/MvcMailMessage.cs#L29can be achieved without upgrading to .NET 4.5 and using async.

If you're happy to take it I'll send a pull request with the change and with the project downgraded to .NET 4 again.

— Reply to this email directly or view it on GitHubhttps://github.com/smsohan/MvcMailer/issues/94#issuecomment-19780707 .

smsohan avatar Jun 20 '13 20:06 smsohan

What issues did you encounter, I've just sent pull request #99 which is quite simple, so I'm concerned if i've missed something, all the tests still pass.

JSkimming avatar Jun 21 '13 08:06 JSkimming

@smsohan did you manage to have a look at the pull request #99? Is that of any value? It allows people using both .NET 4.0 and 4.5 to use the same version of MvcMailer. People using .NET 4.5 can still use async, .NET 4.0 clients can upgrade and make use of the latest bug-fixes.

JSkimming avatar Jun 26 '13 08:06 JSkimming