Newsletter

Sign up for our free newsletter. Your email address will only be used to send out the newsletter.


RSS Feeds

Product news

Home arrow FAQs arrow VSdocman FAQs arrow How to disable warnings related to XML comments in VS 2005?/2008

How to disable warnings related to XML comments in VS 2005?/2008

Sometimes there are cases when XML comments generated by VSdocman can cause VS warnings. It's because VSdocman uses extended syntax. Here we explain how to disable some kinds of such warnings.

1. VSdocman supports XML comments for all types of elements, including namespaces. VS 2005, however, doesn't support XML comments for namespace. In VB .NET, it gives the following warning:

XML comment block cannot be associated with any language element that supports the application of XML documentation comments. XML comment will be ignored.

To suppress this warning in VB .NET we need to manually edit project .vbproj file.

  1. Close VS.
  2. Open .vbproj file. Find <NoWarn> tag and add the warning ID there. In our case the ID is 42312: <NoWarn>42312</NoWarn>. Don’t place any whitespaces and newlines in this tag! There is one <NoWarn> section for each configuration (Release/Debug) so you need to edit all of them.
  3. Save the .vbproj file and open VS.

After this, you shouldn’t get specified warnings during the build nor should you see warning underline during editing.

2. You can similarly disable other warning that may appear when you are using VSdocman. VSdocman can create link to external file. It uses "^" prefix in cref attribute in this case, e.g. <see cref="^abc.txt">. VS doesn't recognize this format and throws the following warning:

XML comment has a tag with a 'cref' attribute '^abc.txt' that could not be resolved. XML comment will be ignored.

The ID of this warning is 42309. So the edited section in .vbproj file can look like <NoWarn>42312,42309</NoWarn>. Note that VS will not warn you on any cref problem since now. But VSdocman will show "Dead link" warning during generation of documentation if necessary.


For more information and for C# specific info see How To Disable Any Specific Warning in VS 2005 .
 
 
© Copyright 2008 Helixoft All rights reserved. | Privacy Statement