Search code examples
.net.net-core.net-framework-version

How to use .net framework from .net core?


I have a .net core xUnit project that references a .net framework project that references Microsoft's Azure Notification Hub API.

It builds, but when try and create a hub, I get the error...

Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

Which seems like an odd error to get given that System.Configuration is referenced.

How do I make the Azure referencing project act like a framework 4.7 project?


Solution

  • Microsoft just shipped a new version that's compatible to .NET Standard 2.0,

    https://azure.microsoft.com/en-us/updates/azure-notifications-hubs-net-sdk-now-compatible-with-net-standard-2-0/

    Please upgrade your SDK to use that. Of course, you need to make other changes according to their documentation.