How do I use "nowarn" on the command line in VS2005?

bmilano

Member
Joined
Nov 15, 2006
Messages
10
Programming Experience
10+
Hi,

I'm worried this is a dumb question, but I've searched the forum and didn't see it answered elsewhere.

I've converted a large VB 2003 app to VB 2005, after a lot of trial and error. I want to turn a particular warning off, but I don't want to turn all warnings off. The warning ID is BC40025. According to the help page, I should be able to specify "/nowarn:BC40025" as a command-line argument to make this particular warning go away.

Here's the dumb question (drumroll, please)...

How exactly DO I specify a command-line argument like this for Visual Studio? I tried doing it in the shortcut for Visual Studio, but that's telling me that "nowarn:BC40025" is an invalid command line switch. Near as I can figure, I can't seem to find a way to do it within Visual Studio. The ways to configure warnings and errors within Visual Studio seem to be an all-or-nothing thing.

Thanks in advance,
Bill
 
If using the commandline compiler VBC.exe you can specify the "/nowarn:40025" parameter (notice only the ID number is used!)

Inside the IDE there is no compile option for this warning specifically and you have to check the 'Disable all warnings' to rid it. (in Application properties, Compile tab)

MSDN documentation topic describing this is here: http://msdn2.microsoft.com/en-us/library/c86sssa5(VS.80).aspx
About the BC40025 error the topic is here with some guidance on changing the type for compliance: http://msdn2.microsoft.com/en-us/library/7294hw1w.aspx

If the 'problem-child' is your work, you should not disable the warning but instead either change the member to use CLS compliant type or apply the <CLSCompliant(False)> attribute. See http://msdn2.microsoft.com/en-us/library/ms182156(VS.80).aspx
 
Thanks!

JohnH,

Thanks for the guidance.

Nah...the problem children are not mine. They are the Version 6 Nero COM objects for CD/DVD burning. I'm hopeful that I will upgrade my Nero from V6 to V7 along with this upgrade, and that Nero V7 is CLS-compliant. However, at the moment, I'm still using Nero V6 on my fledgling VS2005 version of my VS2003 application, and it seems to be working.

Bill
 
Back
Top