Public API analyzer only works in Roslyn.sln if the API file is opened in the editor #42168
Labels
Area-IDE
Bug
Resolution-Fixed
The bug has been fixed and/or the requested behavior has been implemented
Milestone
Version Used: Latest 16.6 dogfood build
Steps to Reproduce:
Workspace.cs
and add a new public API. You should see RS0016 error.Expected Behavior:
Unshipped public API file is changed
Actual Behavior:
Unshipped public API file is not changed. If you repeat the above steps with the public API already open in the editor, code fix does work. NOTE: I am unable to repro this behavior with couple other solutions I tried, but it does repro consistently on Roslyn.sln on both my machines.
I debugged this a bit, and it finally comes down the below code:
roslyn/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs
Lines 1154 to 1167 in abd2fb0
It seems something from the InvisibleEditor code path is causing the scenario to fail, I don't see any exceptions - just the file change does not seem to get saved to disk. I am not sure which component or API does the actual write to disk in invisible editor code path.
The text was updated successfully, but these errors were encountered: