如何在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