我试图通过NuGet Package Manager控制台安装SharpDX v2.6.2。我一直在收到错误,所以我尝试了一个全新的WPF解决方案。以下是我尝试过的步骤以及产生的错误消息:
1。创建一个全新的WPF应用程序,目标.NET4.0
2。打开程序包管理器控制台并运行“安装”命令
>> PM Install-Package SharpDX
但是,在程序包管理器控制台中输出以下内容失败了
Package Manager Console Host Version 2.0.30625.9003
Type 'get-help NuGet' to see all available NuGet commands.
PM> Install-Package SharpDX
Successfully installed 'SharpDX 2.6.2'.
Successfully added 'SharpDX 2.6.2' to SharpDXTest.
Installing [SharpDX] to project [C:\Users\Andrew\SharpDXTest\SharpDXTest\SharpDXTest.csproj]
Uninstalling [SharpDX] from project [C:\Users\Andrew\SharpDXTest\SharpDXTest\SharpDXTest.csproj]
Successfully uninstalled 'SharpDX 2.6.2'.
Install failed. Rolling back...
Install-Package : SharpDX.targets import not found in project [C:\Users\Andrew\SharpDXTest\SharpDXTest\SharpDXTest.csproj]
At line:1 char:1
+ Install-Package SharpDX
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], RuntimeException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
我完全难过! :S其他软件包似乎安装得很好,但SharpDX并没有。有什么建议?
答案 0 :(得分:0)
更新:我设法解决了这个问题。我基本上必须安装最新版本的NuGet(v2.8.2)而不是v2.0。
同样在VS2013中执行安装似乎在现有解决方案上比2012更好。
希望这有助于某人,