web-push-libs / web-push-csharp

Web Push library for C#
Mozilla Public License 2.0
429 stars 108 forks source link

Not working with Asp.Net Core 2 #26

Closed unsorted01 closed 6 years ago

unsorted01 commented 6 years ago

I installed the 1.0.9 version from nugget in an asp.net core 2 project, but when i tried to send a push notification this exception happend: TypeLoadException: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

johnnyoshika commented 6 years ago

I'm running into the same problem. :-(

johnnyoshika commented 6 years ago

The problem is probably related to this: https://github.com/dotnet/corefx/pull/18689

I installed the System.Security.Cryptography.Cng nuget package, but it didn't solve the problem.

johnnyoshika commented 6 years ago

The solution is to use this library instead: https://github.com/vip30/WebPush-NetCore

It's essentially a port of this one and the API is identical.

coryjthompson commented 6 years ago

1.0.10 is built to support asp.net core 2 and has just been released.