• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
.NET Framework Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Downloads
 
 
Support
 
 
Community
 
 
Forums
 
 
 
.NET Framework Developer Center > .NET Development Forums > MSBuild > Generate XML Documentation using MSBuild /property
Ask a questionAsk a question
Search Forums:
  • Search MSBuild Forum Search MSBuild Forum
  • Search All .NET Development Forums Search All .NET Development Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerGenerate XML Documentation using MSBuild /property

  • Tuesday, April 24, 2007 4:21 PMSmaz Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    I want to generate XML documentation for a project without turning on this option permanently in the project. Is there a way to generate the XML documentation file for a project by passing arguments to MSBuild?

     

    For example: 

    Code Snippet

    msbuild XMLComments.csproj /t:Rebuild /p:nowarn=1591 /p:doc=XMLComments.xml

     

    yields the following results:

    Code Snippet
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1591,1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug+ /debug:full /optimize- /out:obj\Debug\XMLComments.exe /resource:obj\Debug\XMLComments.Properties.Resources.resources /target:winexe Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs

     

     

    I expected the /pBig Smileoc parameter to override the settings in the csproj file and generate the XML output. The /p:nowarn parameter worked as I expected. I do not see /doc:XMLComments.xml on the csc command line. MSBuild appears to ignore the /pBig Smileoc parameter.

     

    Is there a work-around for this?

     

    • ReplyReply
    • QuoteQuote
     

Answers

  • Tuesday, April 24, 2007 6:58 PMSimon Dahlbacka Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0
    It should work if you pass in /pBig SmileocumentationFile=foo.xml
    • ReplyReply
    • QuoteQuote
     

All Replies

  • Tuesday, April 24, 2007 9:28 PMSmaz Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    That does the trick. Thank you!
    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement