2017-09-07 58 views
2

試用版本:https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-push,使用VS 2017便攜式Xamarin Forms項目。除了UWP以外,所有其他項目(包括IOS,Android和便攜式庫)都隨着Notificaiton nuget軟件包一起安裝。在UWP中,總是出現以下錯誤消息。謝謝你的幫助。Xamarin形式失敗ti在UWP項目中安裝NotificationHub Nuget

包Microsoft.Azure.NotificationHubs 1.0.9與uap10.0.10240(UAP,版本= v10.0.10240)/ win10-x86-aot不兼容。包裝Microsoft.Azure.NotificationHubs 1.0.9支持:net45(.NETFramework,版本= V4.5)

回答

0

隨着2016年7月Notification Hubs SDK的不可用於UWP。產品團隊意識到這一點,並致力於提供它。

目前,有要解決的一種方式:在Getting started with Notification Hubs for Windows Universal Platform Apps

某些集線器SDK中所述

  • 使用WindowsAzure.Messaging.Managed NuGet包是open sourced。但不幸的是,目前還沒有Windows。

+0

謝謝,困擾於Xamarin表單文章。它說,將推送通知添加到Windows應用程序 在Visual Studio中,在Windows項目中打開App.xaml.cs,並添加以下語句。 複製 使用Newtonsoft.Json.Linq; 使用Microsoft.WindowsAzure.MobileServices; –

+0

是的,這是非常令人困惑的,但請記住,通知根據每個平臺獨立工作,因此您可以按照[本教程](https://docs.microsoft.com/en-us/azure/notification-hubs/notification- hubs-windows-store-dotnet-get-started-wns-push-notification)僅適用於UWP平臺。如果這有助於您,請將其標記爲答案:) –