Nuget:在MvvmCross.CrossCore的活动解决方案中找不到兼容的软件包

时间:2014-05-23 15:12:31

标签: mvvmcross nuget-package

我正在尝试从NuGet命令行将MvvmCross.HotTuna.CrossCore 3.0.14安装到WindowsPhone 8.0类库中。尝试执行此操作时出错:

PM> install-package MvvmCross.HotTuna.CrossCore 3.0.14
install-package : No compatible project(s) found in the active solution.
At line:1 char:1
+ install-package MvvmCross.HotTuna.CrossCore 3.0.14
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetNoCompatibleProjects,NuGet.PowerShell.Commands.InstallPackageCommand

在此解决方案中,我有另一个Windows Phone 8应用程序项目(目标Windows Phone操作系统版本设置为Windows Phone OS 8.0),其中安装了以下MvvmCross软件包。这是在没有任何问题的情况下完成的:

<packages>
  <package id="MvvmCross.HotTuna.CrossCore" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.MvvmCrossLibraries" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.Plugin.File" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.Plugin.Json" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.Plugin.Location" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.Plugin.Messenger" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.Plugin.Sqlite" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.Plugin.Visibility" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.HotTuna.StarterPack" version="3.0.14" targetFramework="wp71" />
  <package id="MvvmCross.PortableSupport" version="3.0.14" targetFramework="wp71" />
  <package id="WPtoolkit" version="4.2013.08.16" targetFramework="wp80" />
</packages>

有人遇到过类似的问题吗?

2 个答案:

答案 0 :(得分:33)

我刚刚遇到了类似的问题,我错过了 - 从命令中。看起来你可能做过类似的事情。

我在努力 install-package Microsoft.AspNet.WebApi.WebHost version 5.1.2

我通过

解决了这个问题

install-package Microsoft.AspNet.WebApi -version 5.1.2 -project GRP2App.Web

注意,我错过了version参数中的 - 。我还添加了project参数,但我认为这不重要。

您的命令install-package MvvmCross.HotTuna.CrossCore 3.0.14在版本号之前没有-version

答案 1 :(得分:0)

尝试安装到错误拼写的项目时出现此错误:

Install-Package 'Package' -ProjectName 'WrongName' -Version 1.0.0

当我修复项目拼写时,一切正常:

Install-Package 'Package' -ProjectName 'CorrectName' -Version 1.0.0