Wednesday, September 19, 2012 8:24 AM
I wonder why Visual studio 2010 does not show me the warring on unused local variables, this property was working fine in my current project, and it still working in the other projects.
I checked the Project property >> Compile Tab >> Unused local variable is set to Warning. but no warning appears in the codes.
If i set this property to Error, the project will not compile and also it does not show me any error in the Error List.
Does anyone have any idea?
Thanks in advance,
Thursday, September 20, 2012 9:32 AMModerator
Thank you for posting in the MSDN forum.
Could you share us this app? We will try to check it in our PC.
If you want to use the code analysis tool to analyze your app, right click your app->Properties->Code Analysis, you need to select “Enable Code Analysis on Build”, and set “Run this rule set ” with the rule you want to use. And then build your project again, check the Output window to find some messages.
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Friday, September 21, 2012 5:50 PM
Hi Jack Zhai,
Thank you for your cooperation.
Unfortunately I could not share the project, because it's belong to the company.
I noticed the reason of not showing the warning for unused local variable was because of the "number of warnings has been exceeded" which were belongs to obsolete methods.
I used external Extension/Tool to fix this issue.
- Marked As Answer by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Monday, September 24, 2012 7:44 AM