2017-06-26 58 views
1

我全新安裝了Windows 10 Pro全新安裝的Visual Studio 2015社區更新3,並試圖安裝TensorFlowSharp軟件包。以管理員身份運行VS,新的控制檯應用程序(沒有任何內容),安裝時出現以下錯誤。如果這是NuGet本身或我想安裝的軟件包的問題,​​我該如何分離?我已經卸載/重新安裝的NuGet,但錯誤是一樣的:Nuget hoiled,或包壞了?

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 
+0

已解決> (facepalm)右鍵單擊> vs 2015項目文件夾上的屬性,並取消選中只讀標誌。真的嗎? VS,以管理員身份運行並不重要。很少浪費60分鐘的故障排除。 – Roger

+0

好... nuget安裝它,但現在我無法構建。當我重建時,我沒有錯誤,一個項目失敗了。當我關閉重新打開視覺stuido時,我得到元素中的屬性「CopyToOutputDirectory」無法識別 – Roger

+1

它依賴於System.ValueTuple Miguel擁有所有最新的玩具VS2017所需 –

回答

0

Nuget hozed, or package broken?

我已經安裝了TensorFlowSharp包在我的機器上使用Visual Studio 2015年,並得到了同樣的錯誤:

The attribute "CopyToOutputDirectory" in element is unrecognized.

但是,當我將它安裝在Visual Studio 2017上時,它已成功安裝,沒有任何錯誤。然後我建立這個項目,它工作正常。

此外,我注意到這個包是在2017年5月21日星期日(2017/5/21)創建的,所以這個包可能是用Visual Studio 2017創建的,作者不會注意到向後兼容性。

要解決此問題,我們需要聯繫軟件包所有者以獲取幫助,或者您可以使用Visual Studio 2017來使用

+0

我將不得不播放並觀看,因爲CUDA庫似乎不喜歡2017:http://docs.nvidia。 COM/CUDA/CUDA安裝引導微軟窗口/#axzz4l8MXDuIW – Roger