-
Notifications
You must be signed in to change notification settings - Fork 165
Description
Describe the bug
When using F# Solution Explorer and using the "Move file up" and Move file down" arrows, no evidence can be seen until the buttons are pressed twice and, in the meantime, the ordering of the files in the fsproj file becomes 'horizontal' rather than 'vertical'.
Steps to reproduce
- Create new project with:
dotnet new classlib -lang f# -o TestLib - Launch VS Code and open the TestLib folder;
- Go to the F# Solution Explorer;
- Add a file called
Test1.fsbelowLibrary.fs; - Add a file called
Test2.fsaboveLibrary.fs; - Go to the VS Code Explorer and open the
fsprojfile.
And it all looks okay – a vertical listing of fs files at this point.
However, when I go back to F# Solution Explorer and press the “up-arrow” icon to the right of Test1.fs no change can be seen.
If I then go to the VS Code Explorer and open the fsproj file I see:
<ItemGroup>
<Compile Include="Test2.fs" />
<Compile Include="Library.fs" /><Compile Include="Test1.fs" />
</ItemGroup>
If I then go back to F# Solution Explorer and press the “up-arrow” icon to the right of Test1.fs again then Test1.fs moves above Library.fs but I now have, in the fsproj file:
<ItemGroup>
<Compile Include="Test2.fs" />
<Compile Include="Test1.fs" /><Compile Include="Library.fs" />
</ItemGroup>
Then, moving Test2.fs down once gives me:
<ItemGroup>
<Compile Include="Test2.fs" /><Compile Include="Test1.fs" /><Compile Include="Library.fs" />
</ItemGroup>
Expected behaviour
I would expect to see the file move on the first press of the buttons and that the files would remain listed 'vertically'.
Machine infos
- OS: Windows 10.0.19045
- .NET SDK version: 9.0.311
- Ionide version: 7.31.1
Additional context
I looked at the line endings of the fsproj file (in Notepad++) and they are all CRLF (except for the final line which is at the end of the file anyway).