如何在c#项目中使用C++ XSD Task?我已经创建任务的的csproj文件是这样的:在c#项目中使用XSD构建任务
<Target Name="BeforeBuild">
<XSD Namespace="$(RootNamespace).Xml" Language="CS" GenerateFromSchema="classes" Sources="Xml/schema.xsd" />
</Target>
但构建输出称,虽然智能感知为我提供的XSD任务而编辑的项目文件:
Error 1 The "XSD" 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.30128" directory. MyProject.csproj
哦,我我正在使用Visual Studio 2010 RC。
*
我知道xsd.exe工具,现在我正在使用Exec任务来完成这项工作。只是想知道如果我可以以某种方式使用已经可用的特定任务(并根据msdn是一个包装xsd.exe).... – m0sa 2010-03-07 17:50:56
这就是我说的。R取消诊断并查看哪些任务已加载以及从何处开始。然后,我们可以看到正确的任务是由MSBUILD实际加载还是不加载。 – 2010-03-07 20:17:23