Nuget hozed,还是破包?

时间:2017-06-26 01:31:15

标签: visual-studio-2015 nuget

我在全新安装的Windows 10 Pro上全新安装了Visual Studio 2015社区更新3,并尝试安装TensorFlowSharp软件包。运行VS作为管理员,新的控制台应用程序(还没有),我在安装时得到以下错误。如果这是NuGet本身或我尝试安装的软件包的问题,​​我如何隔离?我已经卸载/重新安装了NuGet,但错误是一样的:

PM> Install-Package TensorFlowSharp
Attempting to gather dependency information for package 'TensorFlowSharp.0.96.0' with respect to project 'ConsoleApplication6', targeting '.NETFramework,Version=v4.5.2'
Attempting to resolve dependencies for package 'TensorFlowSharp.0.96.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'TensorFlowSharp.0.96.0'
Resolved actions to install package 'TensorFlowSharp.0.96.0'
Adding package 'TensorFlowSharp.0.96.0' to folder 'C:\Users\roger\documents\visual studio 2015\Projects\ConsoleApplication6\packages'
Added package 'TensorFlowSharp.0.96.0' to folder 'C:\Users\roger\documents\visual studio 2015\Projects\ConsoleApplication6\packages'
Install failed. Rolling back...
Package 'TensorFlowSharp.0.96.0' does not exist in project 'ConsoleApplication6'
Removing package 'TensorFlowSharp.0.96.0' from folder 'C:\Users\roger\documents\visual studio 2015\Projects\ConsoleApplication6\packages'
Removed package 'TensorFlowSharp.0.96.0' from folder 'C:\Users\roger\documents\visual studio 2015\Projects\ConsoleApplication6\packages'
Install-Package : The attribute "CopyToOutputDirectory" in element <None> is unrecognized.  C:\Users\roger\documents\visual studio 
2015\Projects\ConsoleApplication6\packages\TensorFlowSharp.0.96.0\build\TensorFlowSharp.targets
At line:1 char:1
+ Install-Package TensorFlowSharp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

1 个答案:

答案 0 :(得分:0)

  

Nuget hozed,还是破包?

我已经使用Visual Studio 2015在我的机器上安装了TensorFlowSharp软件包,并得到了同样的错误:

  

元素中的属性“CopyToOutputDirectory”是   无法识别的。

但是当我在Visual Studio 2017上安装它时,它安装成功而没有任何错误。然后我构建项目,它工作正常。

此外,我注意到这个打包是在2017年5月21日星期日(2017年5月21日)创建的,所以这个包可能是用Visual Studio 2017创建的,作者不会注意到向后兼容性。

要解决此问题,我们需要与软件包所有者联系以获取帮助,或者您可以使用Visual Studio 2017