dotnet sln remove, removes GlobalSection(SolutionConfigurationPlatforms) #9947
Open
Description
Done via the docker image
microsoft/dotnet:sdk 540aa875e6c2
Adding and removing a project to a clean sln removes more than added. Don't know if this is a "real" problem or just are cornercase quirk
Steps to reproduce
mkdir demo
cd demo
dotnet new sln
cat demo.sln > clean.txt
dotnet new classlib -o dummyproj
dotnet sln add dummyproj/dummyproj.csproj
dotnet sln remove dummyproj/dummyproj.csproj
diff demo.sln clean.txt
Expected behavior
No output from diff
Actual behavior
6a7,14
> GlobalSection(SolutionConfigurationPlatforms) = preSolution
> Debug|Any CPU = Debug|Any CPU
> Debug|x64 = Debug|x64
> Debug|x86 = Debug|x86
> Release|Any CPU = Release|Any CPU
> Release|x64 = Release|x64
> Release|x86 = Release|x86
> EndGlobalSection
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.500
Commit: b68b931422
Runtime Environment:
OS Name: debian
OS Version: 9
OS Platform: Linux
RID: debian.9-x64
Base Path: /usr/share/dotnet/sdk/2.1.500/
Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8
.NET Core SDKs installed:
2.1.500 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download