您可以从选项中启用此功能以在 Visual Studio 解决方案资源管理器中显示解决方案
Tools -> Options -> Projects & Solutions ->General-> check the checkbox "Always show solution"
然后right click the solutionFile in SolutionExplorer -> Choose OpenFolder in windows Explorer
打开确切的解决方案文件。在进行任何更改之前,请确保保留解决方案文件的备份文件。现在编辑解决方案文件,查找以下部分,然后添加为后部分。
前:
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{97A7F977-AF9D-494E-AB65-32CCB9A06F30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97A7F977-AF9D-494E-AB65-32CCB9A06F30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C498C19-A5BB-41A2-BA03-B2DC384EB605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C498C19-A5BB-41A2-BA03-B2DC384EB605}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
后:
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{97A7F977-AF9D-494E-AB65-32CCB9A06F30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97A7F977-AF9D-494E-AB65-32CCB9A06F30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97A7F977-AF9D-494E-AB65-32CCB9A06F30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97A7F977-AF9D-494E-AB65-32CCB9A06F30}.Release|Any CPU.Build.0 = Release|Any CPU
{8C498C19-A5BB-41A2-BA03-B2DC384EB605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C498C19-A5BB-41A2-BA03-B2DC384EB605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C498C19-A5BB-41A2-BA03-B2DC384EB605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C498C19-A5BB-41A2-BA03-B2DC384EB605}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
这里“97A7F977-AF9D-494E-AB65-32CCB9A06F30” 和“8C498C19-A5BB-41A2-BA03-B2DC384EB605”是ProjectIds,这在你的情况下可能会有所不同。在这种情况下,我的解决方案中只有2个项目。您必须为此解决方案中的每个项目执行此操作。希望这可以帮助。