roslyn: 'using' CodeActions not available if #line hidden is present anywhere in the file
Repro steps:
dotnet new console
- In Program.cs remove
using System;
- Hover over the now-broken Console.WriteLine and see that
using System;
is a CodeAction option. - Add
#line hidden
just below Console.WriteLine. - Repeat 3 and see that the
using System;
option is now gone.
This affects us because when Razor generates code for the C# portions of it #line default
#line hidden
and #line X
are used.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 16 (16 by maintainers)
Ooo interesting, definitely not a blocker when there’s 0 usings. That’s what I get for trying to get a “minimal” repro 😄
At design time we can start generating a line default around our usings sections because it’s not like you can debug over those anyhow. We can work with this! Feel free to close this issue as by design. Thanks for all the assistance everyone!