Azure Notification Hubs软件包是否与.NET Core兼容?

时间:2016-07-11 18:04:06

标签: c# azure uwp .net-core azure-notificationhub

我正在使用.NET核心应用程序,我发现一些Azure软件包不兼容,例如 NotificationHubs SendGrid

Package Microsoft.Azure.NotificationHubs 1.0.5 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0)
The dependency SendGrid.CSharp.HTTP.Client 2.0.4 does not support framework .NETCoreApp, Version=v1.0

我只尝试添加NotificationHubs和SendGrid。我还没有尝试过任何ActiveDirectory包。

有没有人知道其中一些软件包是否会很快兼容?或者也许我做错了什么?或者,在.NET核心应用程序中是否有一种方法可以引用较旧的包?

谢谢!

2 个答案:

答案 0 :(得分:6)

[更新11/30/2017] Microsoft.Azure.NotificationHubs 2.0.0-preview1与.NET Core兼容,刚刚发布。

[原始答案]截至2016年7月中旬,Azure Notification Hubs SDK不适用于.NET核心。产品团队正在努力,但还没有ETA。

目前,有两种解决方法:

答案 1 :(得分:3)

If you are working on Azure, you are not required to use netcoreapp to use ASP.NET Core. You can still use ASP.NET Core with the Full Framework by targetting net461 instead of netcoreapp1.0 and it will still work, Azure has the Full Framework available and they are both compatible with the same version of NetStandard.

We have several Web Apps that run on netcoreapp1.0 and others on net461 due to package dependencies (like Azure SDKs), and all run on ASP.NET Core.

When the product team start releasing the .Net Core App compatible packages, just re-target netcoreapp1.0 and add the Microsoft.NETCore.App package and it will keep working.

Sample github repo of an Azure Web App using ASP.Net Core with Full Framework