Solved

Preventing a specific warnig message

Posted on 2006-07-20
6
632 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

15 Experts available now in Live!

Get 1:1 Help Now