我已經在Visual Studio 2013中爲我的新項目創建了一個新的PCL項目。但是,每當我嘗試從nuget安裝便攜式mvvmlight庫時,我都會收到以下錯誤消息。PCL框架目標問題
install-package : Could not install package 'Portable.MvvmLightLibs 4.2.30.1'.
You are trying to install this package into a project that targets 'portable-net45+sl40+wp80+win', 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 portable.mvvmlightlibs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
這是我所選擇的目標框架:
因此,大家可以看到我沒有Silverlight 4的選擇,所以不知道爲什麼它試着克至找到一個項目匹配有嗎?
任何人都可以幫我解決這個問題,或者告訴我我做錯了什麼?
感謝 莫羅
根據[NuGet頁面](https://www.nuget.org/packages/Portable.MvvmLightLibs),PCL的目標是Silverlight 5.如果您選中「Silverlight 5」複選框,該軟件包是否可以正確安裝? –
奇怪的是,如果我檢查Silverlight 5並關閉對話框然後重新打開它,它將被取消選中。唯一一次Silverlight 5保持選中狀態的時候是我選擇Xamarin.Android&Xamarin.iOS。但是,如果我選擇那些包然後說我不能安裝它,因爲沒有任何匹配的單聲道項目。不知道爲什麼會發生? – Mauro