Whenever you create a project in Visual Studio, you can create a XML documentation file for the project. It is very simple, you just have to check a box in the Build tab on the project properties screen.

Having done that, you might run into problems. Many a times your project is bound to have some auto generated code like a service reference etc. Now, most of these tools like the svcutil tool does not add comments to the auto generated code, in this situation about 100+ warnings start to appear whenever you build your project.

The warning typically says:

Missing XML comment for publicly visible type or member …

To avoid this situation you can either

  • Document the auto generated code
  • Disable the warning
It is very obvious that the first option is not practical. The second option is simple. All you have to do is disable the warning using #pragma directive.

#pragma warning disable 1591

/* Any code that you do not want to have XML comment */

#pragma warning restore 1591

The above code just disable the warning for the enclosed code and not the entire project. You can enclose about anything in your project from a class to an entire code file.
Related Links
Advertisements

Share your thoughts

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s