csharp-sparkpost icon indicating copy to clipboard operation
csharp-sparkpost copied to clipboard

ASP.Net Core 1.0 compatibility

Open davidetaddeucci opened this issue 9 years ago • 20 comments

When a release version compatible with ASP.Net Core 1.0? Thanks, D.

davidetaddeucci avatar May 24 '16 06:05 davidetaddeucci

How would this library have to be changed to do this?

If you know, want to open a pull request?

darrencauthon avatar May 24 '16 11:05 darrencauthon

I'm going to close this ticket for now. I'm open to any suggestions and help on this, but I probably won't do it on my own.

If anybody wants to pick it up, note it here and we can reopen.

darrencauthon avatar Jun 15 '16 03:06 darrencauthon

Ok, I've been looking at dotnetcore for another project, and... I think this is doable. Simple enough that I'd do it.

darrencauthon avatar Jul 01 '16 15:07 darrencauthon

nice one, will be interested in that

ppreget avatar Sep 12 '16 11:09 ppreget

Do you have an idea of a timetable for this enhancement? Thanks!

waglons avatar Oct 26 '16 19:10 waglons

Hi @waglons I don't have a timetable set. I was going to wait for more dust to settle on Core before I jumped back in. I think there were a few things that I use that I needed to get converted... specifically Unity, Moq, or other test stuff. I blew a decent amount of time converting a couple libraries to Core, and failed because it just didn't seem ready yet.

Do you know how things are now? Someone told me that Moq was on Core now. I'll take another look. @ppreget

darrencauthon avatar Oct 27 '16 14:10 darrencauthon

Core seems to be moving fairly quickly. I've started using it on some client projects.

waglons avatar Nov 16 '16 16:11 waglons

I'll take another look at it, as I need it for other projects as well.

darrencauthon avatar Nov 17 '16 16:11 darrencauthon

If you're interested in this, I have a working port to a netstandard1.6 library. some temporary hacks until System.Net.Mail is released along with netstandard2.0:

  • Removed helpers to map MailMessage to Transmission
  • added dependency on https://www.nuget.org/packages/Mime/ to do the Mime type discovery in one place.
{
  "version": "0.0.0-*",
  "buildOptions": {
    "warningsAsErrors": false
  },
  "dependencies": {
    "Newtonsoft.Json": "9.0.1",
    "Mime": "2.0.0",
    "System.Runtime.Extensions": "4.3.0"
  },
  "frameworks": {
    "netstandard1.6": {
      "dependencies": {
        "NETStandard.Library": "1.6.0"
      }
    }
  }
}

lemme know if you'd like me to post this up somewhere.. i haven't updated test projects or solutions or build stuff, but it might help you to just have the main project code.

andycmaj avatar Feb 15 '17 08:02 andycmaj

You can zip it up and email it to me, at darren at cauthon dot com if that's easier for you. Thank you!

@andycmaj

darrencauthon avatar Feb 15 '17 13:02 darrencauthon

FWIW, this should be in dotnetcore 2.0: https://github.com/dotnet/corefx/pull/12416, so you'll be able to remove that extra mime dependency and add back the System.Net.Mail mapping stuff.

On Wed, Feb 15, 2017 at 5:31 AM Darren Cauthon [email protected] wrote:

You can zip it up and email it to me, at darren at cauthon dot com if that's easier for you. Thank you!

@andycmaj https://github.com/andycmaj

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/darrencauthon/csharp-sparkpost/issues/79#issuecomment-280010959, or mute the thread https://github.com/notifications/unsubscribe-auth/AAF8vsjxA5yHqmzUK3Ed091z8jD-qaoOks5rcv4egaJpZM4IlJ4P .

andycmaj avatar Feb 15 '17 21:02 andycmaj

What is the current plan to support .net core? We are stuck porting our SparkPostMail app:

https://github.com/frapid/frapid/tree/master/src/Frapid.Web/Areas/SparkPostMail

mixerp avatar Mar 21 '17 18:03 mixerp

We too have used a fork SparkPost with System.Net.MailMessage dependencies removed (as they were not needed for us) and we didn't need to worry about mime types.

ctolkien avatar Mar 21 '17 21:03 ctolkien

Same, it looks like I will have to fork this too as I need .netstandard 1.6 support. sigh.

EDIT: Super easy to do, I took this PR, https://github.com/darrencauthon/csharp-sparkpost/pull/138 - and made a few changes and SparkPost is now netstandard1.6 compliant. changes I make were....

  1. change CSProj file to this...
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard1.6</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
  </ItemGroup>

</Project>
  1. All error were around missing GetTypeInfo(), just add those, and it compiles and runs. Ace!

Jetski5822 avatar Apr 13 '17 12:04 Jetski5822

I note that in .Net Framework 4.7, SMTP client is now flagged as obsolete with the suggestion being to use Mail/MimeKit.

Could this add further fuel to the fire of dropping support of System.Net.MailMessage and/or using the MimeKit equivalent - MimeMessage

ctolkien avatar Apr 13 '17 22:04 ctolkien

Still nothing on this? :(

georgiosd avatar Mar 25 '18 20:03 georgiosd

I'm sorry guys.... still need more time.

I'll be dropping the MailMessage entirely, with the possibility of support for MimeMessage later.

darrencauthon avatar Mar 26 '18 14:03 darrencauthon

Any updates?

Robar666 avatar May 07 '18 09:05 Robar666

Is it time to update the title of this ticket to support Core 2.0 or 3.0? 😅

jboarman avatar Mar 21 '19 23:03 jboarman

Should this ticket be closed and instead reference #138 and #150? Is there anything special here that affects ASP.NET that is not addressed with support for .NET Core and/or .NET Standard?

jboarman avatar Mar 22 '19 18:03 jboarman