You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idiom App.Current is standard and correct. I don't want to see any greyed-out text on this line, nor any lightbulbs.
Actual Behavior:
It suggests to change my code to Application.Current.Exit();
DISCUSSION
This idiom App.Current is the correct way for folks to write XAML applications. We should not be shipping with an out-of-the-box analyzer that suggests something other than best practice in this common case.
I think it's fine for our in-the-box style analyzers to have heuristics and knowledge of common idioms in common libraries. And this one is about as common as it gets!
I think the suggestion "you can just disable the Simplify-To-Base suggestion in the options dialog" isn't good enough because users shouldn't have to do extra manual tweaking for a common scenario, and besides most users won't even know that feature exists (once it's introduced in Dev15).
The text was updated successfully, but these errors were encountered:
Version Used: VS2015 Update 2
Steps to Reproduce:
App.Current.Exit();
Expected Behavior:
The idiom
App.Current
is standard and correct. I don't want to see any greyed-out text on this line, nor any lightbulbs.Actual Behavior:
It suggests to change my code to
Application.Current.Exit();
DISCUSSION
This idiom
App.Current
is the correct way for folks to write XAML applications. We should not be shipping with an out-of-the-box analyzer that suggests something other than best practice in this common case.I think it's fine for our in-the-box style analyzers to have heuristics and knowledge of common idioms in common libraries. And this one is about as common as it gets!
I think the suggestion "you can just disable the Simplify-To-Base suggestion in the options dialog" isn't good enough because users shouldn't have to do extra manual tweaking for a common scenario, and besides most users won't even know that feature exists (once it's introduced in Dev15).
The text was updated successfully, but these errors were encountered: