Saml2: dependency on .NET Framework 4.x with Sustainsys.Saml2.AspNetCore2

Created on 5 Jan 2018  路  9Comments  路  Source: Sustainsys/Saml2

I noticed that the Sustainsys.Saml2.AspNetCore2 package popped up on NuGet a few days back. I'm trying to test it out in a .NET Core 2.0 project however and it seems there's still a dependency on .NET Framework:

  • after adding the package and doing nothing else the following warning appears in our build output: Package 'Sustainsys.Saml2.AspNetCore2 0.22.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
  • if I ignore this and try add a new SAML provider (adding services.AddAuthentication().AddSaml2(...) into my ConfigureServices()) then when I try to specify the EntityId I see the warning "The type 'EntityId' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

Is this the expected behaviour or have I done something stupid?

If there's anything I can do to help - either testing anything out or providing an example - then please let me know.

question

Most helpful comment

There is a preview available on nuget now at https://www.nuget.org/packages/Sustainsys.Saml2.AspNetCore2, so closing this issue.

All 9 comments

Yes, the Sustainsys.Saml2.AspNetCore2 package currently published has a dependency on the full .NET Framework. There's a preview (currently private) that supports .NET Core, I'm planning to push it to the public repo next week.

Nice one - that's good to hear. Thanks for the quick response Anders :)

@smcl Check the netstandard branch (which despite its name doesn't target netstandard yet, but rather dual targets .NET Core and full framework). Very much work in progress, don't use it in production yet. Nuget preview packages are on the way.

Great - I鈥檒l grab that branch and try it out in our dev environment tomorrow. Thanks for the heads-up!

@AndersAbel any updates on this, i have created a sample application with the full .net framework referenceing 4.6.2 but its still giving me the same error? did i miss something other then installing the nuget? https://www.nuget.org/packages/Sustainsys.Saml2.AspNetCore2

@mlawand I had to add a bunch of Kentor using statements to get it to work. Is this right?

C# using Kentor.AuthServices; using Kentor.AuthServices.Metadata; using Kentor.AuthServices.WebSso; using Sustainsys.Saml2;

@kjbetz Yes, the preview package from the netstandard branch has not yet got the full rename done.

There is a preview available on nuget now at https://www.nuget.org/packages/Sustainsys.Saml2.AspNetCore2, so closing this issue.

@AndersAbel Any idea when this will be out of preview and into a stable package?

Was this page helpful?
0 / 5 - 0 ratings