Solved

Preventing a specific warnig message

Posted on 2006-07-20
6
631 Views
Last Modified: 2008-04-18
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?
0
Comment
Question by:mco
6 Comments
 
LVL 5

Expert Comment

by:nickhoggard
ID: 17144686
Hi,

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:

<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>

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

Hope this helps

Cheers

Nick
0
 
LVL 1

Author Comment

by:mco
ID: 17147109
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.
0
 
LVL 9

Accepted Solution

by:
DrAske earned 50 total points
ID: 17154017
try this :

#pragma warning (C# Reference)
http://msdn2.microsoft.com/en-us/library/441722ys.aspx
0
 
LVL 1

Author Comment

by:mco
ID: 17162408
Sorry, I have forgotten to mention that the code is written in VB.NET .
The above pragma exists only for C#.
0
 

Expert Comment

by:grhind
ID: 21385222
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.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now