[英]How do I pass two namespaces into XSDObjectGen from command line?
I'm trying to use XSDObjectGen as a PreBuild in Visual Studio 2008. 我正在尝试将XSDObjectGen用作Visual Studio 2008中的PreBuild。
I can run it on the command line: 我可以在命令行上运行它:
XSDObjectGen\XSDObjectGen.exe AnalyticsDomainModel.xsd /l:cs /d /p /n:AdaptorAnalyticDomainModel.Primatives /n:AdaptorAnalyticDomainModel /f:AnalyticDomainModel
This then prompts for me to type two names spaces: 然后,这提示我键入两个名称空间:
Imported namespaces were found. Please enter valid .NET namespace names for each namespace. WARNING. Namespaces chosen must not conflict with types and element names from the schemas. Xsd namespace = http://sempra.com/schema/adm/primatives/1.0. Please enter a CLR namespace name for this namespace: AdaptorDomainModel.Primatives Xsd namespace = http://sempra.com/schema/adm/1.0. Please enter a CLR namespace name for this namespace: AdaptorDomainModel Done. Success Writing file AdaptorDomainModel.cs. Writing file AdaptorDomainModel.Primatives.cs.
an I have to type the bits after "namespace:". 我必须在“命名空间:”之后输入位。 Because it requires me to enter the name spaces manually I can't automate the process. 因为它要求我手动输入名称空间,所以无法自动执行该过程。
How do I pass in the two arguments on the command line? 如何在命令行中传递两个参数? Is this a bug? 这是错误吗?
I found the answer.... maybe you'll have the same problem and want the solution. 我找到了答案。...也许您会遇到同样的问题,并希望找到解决方案。 So here it is. 就是这样
There is an option on the later version of this tool called /y you use it like so: 此工具的更高版本上有一个选项/ y,您可以这样使用它:
XSDObjectGen\XSDObjectGen.exe AnalyticsDomainModel.xsd /l:cs /d /p /n:dummy /y:"AdaptorAnalyticDomainModel.Primatives|AdaptorAnalyticDomainModel"
This allows for passing in the extra namespace names. 这允许传递额外的名称空间名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.