Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Missing Warnings

Anyone find where when you open a certain solution (that contains multiple projects) and compile that you're not seen some warnings that your colleagues see when compiling the exact same solution at the exact same state? The code is the same.

I depend highly on the warnings as a shortcut to find unused methods, etc. But I get nothing during compile.. only a couple based on references to user controls, etc.

like image 294
PositiveGuy Avatar asked Apr 19 '10 21:04

PositiveGuy


People also ask

How do I enable warnings in Visual Studio?

If you want to turn it on (or off) in the project setting, you have to go to: Configuration Properties -> C/C++ -> Command Line and then under Additional Options you can enter: /w3#### to set your warning to level 3, and thus enable it; or you can enter /wd#### to disable a warning.

How do I show warnings in Vscode?

You can click on the summary or press Ctrl+Shift+M to display the PROBLEMS panel with a list of all current errors. If you open a file that has errors or warnings, they will be rendered inline with the text and in the overview ruler.

How do I skip a warning in Visual Studio?

Turn off the warning for a project in Visual StudioSelect the Configuration Properties > C/C++ > Advanced property page. Edit the Disable Specific Warnings property to add 4996 . Choose OK to apply your changes.


2 Answers

Just guessing here... When you first build a solution, it has to compile everything. In that case all warnings come up. If you run build for a second time, it will only compile what has changed, using the previously compiled (cached) assemblies whenever it can. In that case the code that doesn't get compiled doesn't show warnings. If you want to see all warnings again, do a Rebuild from the Build menu which will force all the code to recompile and thus show the warnings.

like image 183
Nelson Rothermel Avatar answered Oct 20 '22 00:10

Nelson Rothermel


Maybe your compiler warning level is not as strict as your collegues: http://msdn.microsoft.com/en-us/library/13b90fz7%28VS.71%29.aspx

like image 39
Robert Durgin Avatar answered Oct 20 '22 01:10

Robert Durgin