Open AArnott opened 3 years ago
This is unbelievably agonizingly horrible. Definitely needs to be fixed somehow.
The file is not readonly as far as the editor is concerned (I see no lock icon on the tab) so we go ahead with this dialog. Can Roslyn set BSF_USER_READONLY on the text buffer for such documents perhaps?
Just ran into this today and was surprised. Would love to see it fixed 🙂
Moving to 17.13. @sharwell can you pleease make sure the document is marked as readonly when we open it?
Version Used: Dev17 preview 2 (31502.19.main)
Steps to Reproduce:
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.1.506-beta" PrivateAssets="all" />
to the project file.CreateFile
as its entire content.CreateFile
as the search term or through Solution Explorer's Analyzers node.Expected Behavior:
Generated code file opens.
Actual Behavior:
The file opens, but also asks the user if they want to normalize line endings:
Inconsistent line endings should have no impact on the user, and in fact on the same screen, you can see in the screenshot that VS is asking the user to change the file in the modal dialog and also advising them that they cannot change the generated file via the infobar across the top of that document.