From 02f6a1ef77ed604675df7fc4501d68a3875c68e3 Mon Sep 17 00:00:00 2001 From: Virgile Bello Date: Mon, 2 Oct 2023 20:25:30 +0900 Subject: [PATCH] Fix VSPackage build --- build/Stride.VisualStudio.sln | 9 --------- sources/core/Stride.Core.Design/VisualStudio/Project.cs | 8 ++++---- .../Stride.Core.Design/VisualStudio/SolutionReader.cs | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/build/Stride.VisualStudio.sln b/build/Stride.VisualStudio.sln index d29f999681..4f78c67c13 100644 --- a/build/Stride.VisualStudio.sln +++ b/build/Stride.VisualStudio.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.VisualStudio.Commands", "..\sources\tools\Stride.VisualStudio.Commands\Stride.VisualStudio.Commands.csproj", "{EF920B86-36CA-4457-8D6C-1F300F97C355}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.VisualStudio.Commands.Interfaces", "..\sources\tools\Stride.VisualStudio.Commands.Interfaces\Stride.VisualStudio.Commands.Interfaces.csproj", "{C2E8CBA7-04A8-44F9-ABA2-7D245AFF88E7}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.VisualStudio.Package", "..\sources\tools\Stride.VisualStudio.Package\Stride.VisualStudio.Package.csproj", "{740ECD08-3EF4-40D9-B0D3-B37BC354F79D}" @@ -19,10 +17,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EF920B86-36CA-4457-8D6C-1F300F97C355}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EF920B86-36CA-4457-8D6C-1F300F97C355}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF920B86-36CA-4457-8D6C-1F300F97C355}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EF920B86-36CA-4457-8D6C-1F300F97C355}.Release|Any CPU.Build.0 = Release|Any CPU {C2E8CBA7-04A8-44F9-ABA2-7D245AFF88E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2E8CBA7-04A8-44F9-ABA2-7D245AFF88E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2E8CBA7-04A8-44F9-ABA2-7D245AFF88E7}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -43,7 +37,4 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\sources\shared\Stride.NuGetResolver\Stride.NuGetResolver.projitems*{ef920b86-36ca-4457-8d6c-1f300f97c355}*SharedItemsImports = 5 - EndGlobalSection EndGlobal diff --git a/sources/core/Stride.Core.Design/VisualStudio/Project.cs b/sources/core/Stride.Core.Design/VisualStudio/Project.cs index 627bd8d6f4..7d313e75c9 100644 --- a/sources/core/Stride.Core.Design/VisualStudio/Project.cs +++ b/sources/core/Stride.Core.Design/VisualStudio/Project.cs @@ -214,10 +214,10 @@ public IEnumerable GetDependencies(Solution solution) // Example: "{GUID}|Infra.dll;{GUID2}|Services.dll;" var propertyItem = sections["WebsiteProperties"].Properties["ProjectReferences"]; var value = propertyItem.Value; - if (value.StartsWith('\"')) - value = value[1..]; - if (value.EndsWith('\"')) - value = value[..^1]; + if (value.StartsWith("\"")) + value = value.Substring(1); + if (value.EndsWith("\"")) + value = value.Substring(0, value.Length - 1); foreach (var dependency in value.Split(';')) { diff --git a/sources/core/Stride.Core.Design/VisualStudio/SolutionReader.cs b/sources/core/Stride.Core.Design/VisualStudio/SolutionReader.cs index f289fd0bb9..1ead87ef57 100644 --- a/sources/core/Stride.Core.Design/VisualStudio/SolutionReader.cs +++ b/sources/core/Stride.Core.Design/VisualStudio/SolutionReader.cs @@ -297,7 +297,7 @@ private void ReadHeader() { var line = ReadLine(); solution.Headers.Add(line); - if (line.StartsWith('#')) + if (line.StartsWith("#")) { return; }