darrencauthon / csharp-sparkpost

C# Client Library for SparkPost Email Service
Apache License 2.0
56 stars 53 forks source link

ASP.Net Core 1.0 compatibility #79

Open davidetaddeucci opened 8 years ago

davidetaddeucci commented 8 years ago

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

darrencauthon commented 8 years ago

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

If you know, want to open a pull request?

darrencauthon commented 8 years ago

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 commented 8 years ago

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

ppreget commented 8 years ago

nice one, will be interested in that

waglons commented 8 years ago

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

darrencauthon commented 8 years ago

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

waglons commented 8 years ago

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

darrencauthon commented 8 years ago

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

andycmaj commented 7 years ago

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:

{
  "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.

darrencauthon commented 7 years ago

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

andycmaj commented 7 years ago

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 notifications@github.com 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 .

mixerp commented 7 years ago

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

ctolkien commented 7 years ago

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.

Jetski5822 commented 7 years ago

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!
ctolkien commented 7 years ago

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

georgiosd commented 6 years ago

Still nothing on this? :(

darrencauthon commented 6 years ago

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

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

Robar666 commented 6 years ago

Any updates?

jboarman commented 5 years ago

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

jboarman commented 5 years ago

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?