Solved

Preventing a specific warnig message

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET 5 Templates 2 78
Vb. Net application freezes 9 45
compare between entities in entity framework 8 69
Help with preventing selection from a combobox 11 21
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 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