Add MS.CA.CSharp.Workspaces and MS.CA.VB.Workspaces as VSIX analyzer …#57294
Add MS.CA.CSharp.Workspaces and MS.CA.VB.Workspaces as VSIX analyzer …#57294RikkiGibson merged 4 commits intodotnet:release/dev17.0from
Conversation
…assets Fixes dotnet#57293 With recent changes to move OOP to .NET Core, we seem to require specifying analyzer dependencies as analyzer assets. dotnet@6c7f97b added MS.CA.Workspaces as an asset, this change extends it to add the C# and VB Workspaces assemblies as analyzer assets.
|
Tagging @jinujoseph @vatsalyaagrawal for visibility NOTE: Without this change, all our IDE analyzers that reference CSharpCodeStyleOptions or VisualBasicCodeStyleOptions in their constructor will fail to load, we have large number of such analyzers in our codebase. |
|
@genlu Will probably need your help here, seeing the following build time failure in integration test runs: |
|
Thank you @JoeRobich |
| } | ||
| "); | ||
| VisualStudio.Editor.InvokeCodeActionList(); | ||
| VisualStudio.Editor.Verify.CodeAction("Unnecessary assignment of a value to 'x'"); |
There was a problem hiding this comment.
@akhera99 Thanks for adding the test. Shouldn't the code action string here be 'Remove redundant assignment'?
There was a problem hiding this comment.
@akhera99 You may need to fix the added integration test with a separate test-only PR.
|
|
||
| [WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedValues)] | ||
| [WorkItem(57293, "https://github.com/dotnet/roslyn/issues/57293")] | ||
| public void RemoveRedundantAssignmentCodeFix() |
There was a problem hiding this comment.
Just want to point out that this change is required at the moment to cover Core host sceanrios.

…assets
Fixes #57293
With recent changes to move OOP to .NET Core, we seem to require specifying analyzer dependencies as analyzer assets. 6c7f97b added MS.CA.Workspaces as an asset, this change extends it to add the C# and VB Workspaces assemblies as analyzer assets. These assemblies define CSharpCodeStyleOptions and VisualBasicCodeStyleOptions types, which are used in ctors of many of our analyzers.