2014-11-02 45 views
0

我嘗試在本教程中顯示的Windows Phone Store應用程序中引用WindowsAzure.MobileServices.Backend.Security。通過Nuget在Windows Phone Store應用程序中引用WindowsAzure.MobileServices.Backend.Security

http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-windows-store-dotnet-get-started-users/

當我運行的NuGet:

PM> install-package WindowsAzure.MobileServices.Backend.Security 

我得到以下錯誤:

... 
Adding 'Owin 1.0' to xxxx.WindowsPhone. 
Uninstalling 'Owin 1.0'. 
Successfully uninstalled 'Owin 1.0'. 
Install failed. Rolling back... 
install-package : Could not install package 'Owin 1.0'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content 
files that are compatible with that framework. For more information, contact the package author. 
At line:1 char:1 
+ install-package WindowsAzure.MobileServices.Backend.Security 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [Install-Package], InvalidOperationException 
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand 

我試過WindowsAzure.MobileServices.Backend.Security軟件包的所有版本都沒有成功。

回答

1

Owin NuGet package只有.NET 4.0的程序集,因此您無法將其安裝到Windows Phone應用程序中。

查看教程,他們將WindowsAzure.MobileServices.Backend.Security NuGet包添加到服務器端Web應用程序中。在Windows Phone應用程序端,他們只是調用服務器端Web應用程序公開的Web服務。

+0

好吧,我明白了。謝謝! 如何獲取服務器端Web應用程序的代碼(Visual Studio項目),以及如何將它們部署回服務(Azure服務器)上?我在教程中找不到任何提示。 – Snowcrack 2014-11-03 14:38:54

+0

該文章鏈接到另一個移動服務快速入門教程,他們在其中創建服務器端應用程序。 http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-windows-store-dotnet-get-started/ – 2014-11-03 15:52:37

+0

非常感謝!我有錯誤的後端(JavaScript)... – Snowcrack 2014-11-10 19:01:35

相關問題