Since you are here, do you know that the faulty Visual Studio Editor package is still installed in some of the toturials that are proposed in the Learn section?
I do not repro your issue with the sln file. Could you share with me more information:
In Visual Studio, Help/About, use copy info and paste the result here (or send us everything to vstusp[at]microsoft[dot]com). Perhaps one of your VS extensions is interfering.
In Unity, Help/About could you share the VSTU version you see displayed (on the bottom left corner of the window).
Following your repro could you share the content of the solution file before AND after your manual last save before quitting ?
Visual Studio opened, I didn’t modified the script,
the content of the .sln file open in Notepad++ is the following:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 16
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Even though I didn’t modify the script, VS asked about saving the .sln on quitting which I did. The content of the .sln file open in Notepad++ is now the following:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29418.71
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{1555CFEA-8013-20C8-0315-C35A555A8F51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1555CFEA-8013-20C8-0315-C35A555A8F51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1555CFEA-8013-20C8-0315-C35A555A8F51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1555CFEA-8013-20C8-0315-C35A555A8F51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1555CFEA-8013-20C8-0315-C35A555A8F51}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {351217FB-0D9F-403B-9615-45C80AEA767A}
EndGlobalSection
EndGlobal
Note: Visual Studio was updated just before I did that, it still asks about saving the .sln file on quitting.
Note 2: The same content of the .sln file in a 2019.2 project. This content is unchanged if I open the script and do not modify it.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 16
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{D0639992-E2EC-E986-9972-A3E6FA1E3A45}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D0639992-E2EC-E986-9972-A3E6FA1E3A45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0639992-E2EC-E986-9972-A3E6FA1E3A45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0639992-E2EC-E986-9972-A3E6FA1E3A45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0639992-E2EC-E986-9972-A3E6FA1E3A45}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
So I tried with a custom build of 2020.1.a06 on which we are working with @miniwolf_unity , and I do not repro.
Just downloaded the latest a09, and indeed I repro on this one.
@miniwolf_unity we had a deeper look, and we repro even when disabling completely our bridge (so with pure generation on the Unity side).
Starting with a08, for this super simple scenario, Unity is generating a csproj and a solution with distinct ProjectGuids !? for the project.
After reading the solution, VS detects the mismatch and try to fix that in-memory. That’s why it is asking about saving the .sln file on quit.
In the example @ gave:
Unity is generating the csproj with a ProjectGuid = 1555CFEA-8013-20C8-0315-C35A555A8F51
Unity is generating the solution with a ProjectGuid = 5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0
Then VS loads the solution, detects the mismatch and want to use 1555CFEA-8013-20C8-0315-C35A555A8F51 in the solution instead of 5CCFC07A-2A51-79A4-10FA-4ABD2D79C9B0.
Given ProjectGuids are generated using a hash on a name, starting with a08, the island/project name is perhaps changing between the csproj and the sln generation.
That sounds like we introduce a regression indeed. The ProjectGUID should match. We just updated with an entire new test suite, and it sounds like one of the tests verified the invalid case, which caused this to have been fixed incorrectly. I will get on that. To keep track of this issue, it would be great if a bug could be created.