XML Comments for Web Services (VS 2005)

Number of View: 746

Recently I needed to add XML comments to a web services project and realized it’s not as easy as for other projects. Thanks Derek for helping out, here’s how I did it.

In the web.config:

<configuration>
<system.codedom>
<compilers>
<compiler
language=”c#;cs;csharp”
extension=”.cs”
warningLevel=”4″
type=”Microsoft.CSharp.CSharpCodeProvider,
System,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089″
compilerOptions=”/doc:xmldoc.xml
/nowarn:1591,0618″>
</compiler>
</compilers>

</system.codedom>

This provides building of xml comment files on build of the project (in this case the xml file is called xmldoc.xml in the main project directory, you can change to whatever you like). Note that I have some specific requirements for this build but in most cases you can safely remove the /nowarn switch within compiler options.

Comments are closed.

Copyright © Digital Carnival All Right Reserved.