I'm trying to clear the warnings given when my solution compiles in VS2010. Currently there are some 600, but most seem to be due to MSpec files.
How can I suppress the warnings for any file that ends *spec.cs? They're for MSpec tests and fixing many of them break the flow of the test code. I'm sure I won't need to consider those when the product is shipped.
In C# go to Project > Properties Alt+F7 > Build page > Errors and warnings section > Suppress warnings text box. Enter numbers of the warnings separated by comma or semicolon.
In C++ go to Project > Properties > Configuration Properties > C/C++ > Advanced > Disable Specific Warnings text box. Enter numbers of the warnings separated by semicolon.
At the top of the file put:
#pragma warning disable
Or for a specific warning: (for example warning CS0649)
#pragma warning disable 649
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With