I have a solution with lots of projects. Each project is configured to generate the XML documentation file when building in Debug-Mode (which is default). That works when I build in Visual Studio 2008. In my build script on my integration server I advise MSBuild to build the whole solution, but it won't generate the documentation files. What can I do?
I already tried to explicitly give the Debug-Condition to the build process, but it makes no difference.
<Target Name="BuilSolution">
<MSBuild Projects="C:\Path\To\MySolution.sln" targets="Build" Properties="SolutionConfigurationPlatforms='Debug|Any CPU'"/>
</Target>
There seem to be some ideas to solve this problem when building single projects, but I can't afford to do this, so I need a hint for doing it this way.
Thanks in advance!
To build a specific target of a specific project in a solution. At the command line, type MSBuild.exe <SolutionName>. sln , where <SolutionName> corresponds to the file name of the solution that contains the target that you want to execute.
Build the targettargets file. Run MSBuild from the Developer Command Prompt for Visual Studio to build the HelloWorld target defined above. Use the -target or -t command-line switch to select the target.
To run MSBuild at a command prompt, pass a project file to MSBuild.exe, together with the appropriate command-line options. Command-line options let you set properties, execute specific targets, and set other options that control the build process.
In VS 2010, you can either do this in C# project properties, or you can define a DocumentationFile
property in your .csproj file. For example:
<PropertyGroup>
...
<DocumentationFile>$(OutputPath)MyAssembly.xml</DocumentationFile>
</PropertyGroup>
The MSBuild code in $(MSBuildToolsPath)\Microsoft.CSharp.targets
will condition on that property being defined - if it is, your XML Comments file will be created.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With