Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 658
  • Last Modified:

Preventing a specific warnig message

When building my project in Visual Studio 2005, I get a tremendous amount of warnings like the following
"warning BC40028: Type of parameter 'form' is not CLS-compliant." .
Also , I have a green undelining in the source editor under the relevant identifier.

I know how to prevent this in command line compilation (/nowarn:)
In the project properties , in the 'Compile' section, there is a list of warning which you can decide whether to show or not, but the above warning is not included.

How do I make these warnings ignored within the VS 2005?
1 Solution

I havn't tried it, but you could add it to the <nowarn> tag in the vbproj file.  My one on a test project currently reads:


Note you'll probably have to change it for all the project configs (eg Debug, Release etc).

Hope this helps


mcoAuthor Commented:
Actually I have tried that but it is not a solution.
It does work by iteself but the next time you change something in the Project properties , your changes are overwritten.
That file is not meant to be edited manually.
try this :

#pragma warning (C# Reference)
mcoAuthor Commented:
Sorry, I have forgotten to mention that the code is written in VB.NET .
The above pragma exists only for C#.
I know this has been closed but for vb.net 2008 developers you can open the .vbproj file in notepad and look for an xml tag <NoWarn> there you can list the additional numbers you don't want to see warnings for.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now