在Nuget添加SFML.NET之后无法编译项目

时间:2014-08-24 18:04:38

标签: visual-studio-2012 nuget sfml.net

通过Nuget Packge管理器添加SFML.NET后,我收到以下错误:

Error   4   The "UnzipNuspec" task was not found. Check the following: 1.) The name of the       
task in the project file is the same as the name of the task class. 2.) The task class is     
"public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is     
correctly declared with <UsingTask> in the project file, or in the *.tasks files located 
in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.   

我正在使用Visual Studio 2012.

正如其他类似问题所指出的那样,我试图关闭并打开MSVS,它没有帮助。 我还检查了注册表中的构建工具路径,它指向正确的目录。 我尝试安装和卸载Nuget packeage。

我发现错误可能以某种方式连接到它的依赖:Baseclass.Contrib.Nuget.Output,但我无法找到如何修复它。

1 个答案:

答案 0 :(得分:1)

这是构建脚本中的一个错误。

转到解决方案的packages文件夹,找到以下文件:

Baseclass.Contrib.Nuget.Output.1.0.6\build\net40\Baseclass.Contrib.Nuget.Output.targets

在该文件的第84行附近,您会找到几个<Using Namespace=... />个标签。在<Code...>标记之前添加此内容:

<Using Namespace="System.Threading" />

我也在他们的github问题列表中报告了这一点。