我们正在将NotificationHubs版本1.0.9与.NetCore 2.0和.Net Framework 4.7一起使用.
We are using NotificationHubs version 1.0.9 with .NetCore 2.0 and .Net Framework 4.7.
在编译时,我们会收到以下警告:
At compile time, we get this warning:
软件包Microsoft.Azure.NOtificationHubs 1.0.9已使用'.NETFramework,version = 4.6.1'而不是项目目标框架'.NETCoreApp,version = 2.0进行了还原.此软件包可能与您的项目不完全兼容."
"Package Microsoft.Azure.NOtificationHubs 1.0.9 was restored using '.NETFramework, version=4.6.1' instead of the project target framework '.NETCoreApp, version=2.0. this package may not be fully compatible with your project."
所有内容仍在构建中,但是在运行时调用此调用时:
Everything is still built, but at runtime when this call is invoked:
RegistrationDescription hubRegistration = await hubClient.CreateAppleNativeRegistrationAsync(device.DeviceToken); //hubClient is NotificationHubClient我们收到此错误:
以前有没有人遇到过这个问题,并且知道如何解决?
Has anyone encountered this before and have any idea how to fix it?
推荐答案.NET标准兼容的NuGet 现在可用.它将允许将通知中心与.NET核心一起使用.
A preview version of a .NET Standard compatible NuGet is now available. It will allow using Notification Hubs with .NET core.
更多推荐
Microsoft.Azure.NotificationHubs 1.0.9是否与.NET Core 2.0兼容?
发布评论