<Copy SourceFiles="@(sourceFiles)" DestinationFolder="$(destinationFolder)\"/>
这在MSBuild 3.5中对我来说很好用。但是因为我一直在尝试迁移到4.0,所以MSBuild会抛出这个错误。
The "Microsoft.Sdc.Tasks.Folder.Copy" task could not be loaded from the assembly Microsoft.Sdc.Tasks.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
我尝试过UsingTask
,但仍然徒劳无功。有什么想法吗?
答案 0 :(得分:1)
原因很简单,
因此,您会看到错误消息。
我的建议,
<UsingTask>
中使用依赖文件夹的汇编路径。我的开源项目#SNMP使用Gendarme MSBuild扩展,我已经使用了上述技巧很长一段时间了,
https://github.com/lextm/sharpsnmplib/blob/master/SharpSnmpLib/SharpSnmpLib.csproj