2016-01-19 130 views
1

我試圖通過包管理器控制檯在Visual Studio中安裝TestStack.White與NuGet,但是當我在包中輸入「Install-Package TestStack.White」命令經理控制檯我得到這個錯誤:在Visual Studio中通過包管理器控制檯安裝TestStack.White

Installing 'Castle.Core 3.3.3'. 
Successfully installed 'Castle.Core 3.3.3'. 
Installing 'TestStack.White 0.13.3'. 
Successfully installed 'TestStack.White 0.13.3'. 
The names of some imported commands from the module 'TestStack.White' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. 
Adding 'Castle.Core 3.3.3' to PSTableManager. 
Uninstalling 'Castle.Core 3.3.3'. 
Successfully uninstalled 'Castle.Core 3.3.3'. 
Install failed. Rolling back... 
Install-Package : Could not install package 'Castle.Core 3.3.3'. You are trying to install this package into a project that targets 'Native,Version=v0.0', 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 

我做錯了什麼?我怎樣才能解決這個問題?

回答

1

您無法安裝此軟件包的原因是因爲它與您的項目不兼容。包TestStack.White是基於.NET(管理),所以它不能被添加到本地C++項目:

You are trying to install this package into a project that targets 'Native,Version=v0.0', but the package does 
not contain any assembly references or content files that are compatible with that framework. 

有C++託管版本,它被稱爲C++/CLI。您可以嘗試使用它與TestStack.White包一起使用。但是,這取決於您的項目的要求。如果您必須創建本機應用程序,那麼您不能使用C++/CLI。

+0

謝謝,這解決了它! – ColdZer0

相關問題