2009-08-14 30 views
1

我試圖在Visual Studio中使用XSDObjectGen作爲預生成2008如何從命令行將兩個名稱空間傳入XSDObjectGen?

我可以在命令行上運行它:

XSDObjectGen\XSDObjectGen.exe AnalyticsDomainModel.xsd /l:cs /d /p /n:AdaptorAnalyticDomainModel.Primatives /n:AdaptorAnalyticDomainModel /f:AnalyticDomainModel 

這則提示我輸入兩個名字空間:

 
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. 

我必須在「namespace:」之後鍵入位。因爲它需要我手動輸入名稱空間,所以無法自動執行該過程。

如何在命令行中傳遞兩個參數? 這是一個錯誤?

回答

1

我找到了答案....也許你會有同樣的問題,並希望得到解決方案。所以在這裏。

有一個叫這個工具的更新版本的選項/ Y你使用它,像這樣:

XSDObjectGen\XSDObjectGen.exe AnalyticsDomainModel.xsd /l:cs /d /p /n:dummy /y:"AdaptorAnalyticDomainModel.Primatives|AdaptorAnalyticDomainModel" 

這允許傳遞額外的命名空間的名稱。

相關問題