Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Preventing a specific warnig message

Posted on 2006-07-20
6
Medium Priority
?
650 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 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

963 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