From de892dd89435f72cdae3228c4f165ab0b3d87d14 Mon Sep 17 00:00:00 2001 From: Adam Friedman Date: Sun, 29 Nov 2020 16:56:16 +1100 Subject: [PATCH] Upgrade the language service to use the .NET Core 3.1 runtime tintoy/msbuild-project-tools-server#20 --- .appveyor.yml | 6 +++--- .vscode/launch.json | 4 ++-- CHANGELOG.md | 4 ++++ README.md | 2 +- build.ps1 | 4 ++-- build.sh | 4 ++-- docs/BUILDING.md | 4 ++-- src/LanguageServer.Common/LanguageServer.Common.csproj | 2 +- .../CompletionProviders/PropertyElementCompletion.cs | 2 +- src/LanguageServer.Engine/LanguageServer.Engine.csproj | 2 +- .../LanguageServer.SemanticModel.MSBuild.csproj | 2 +- .../LanguageServer.SemanticModel.Xml.csproj | 2 +- .../LanguageServer.TaskReflection.csproj | 2 +- src/LanguageServer/LanguageServer.csproj | 2 +- .../LanguageServer.Engine.Tests.csproj | 2 +- test/LanguageServer.Engine.Tests/TaskScannerTests.cs | 2 +- 16 files changed, 25 insertions(+), 21 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9b6cc2c..27fefe3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -version: 0.3.9.{build} +version: 0.3.11.{build} image: Visual Studio 2019 build_script: - ps: >- @@ -14,9 +14,9 @@ build_script: & $dotnet pack -o "$PWD\out\packages" /p:Version="$env:APPVEYOR_BUILD_VERSION" - & $dotnet publish "$PWD\src\LanguageServer\LanguageServer.csproj" -f netcoreapp3.0 -o "$PWD\out\language-server" /p:Version="$env:APPVEYOR_BUILD_VERSION" + & $dotnet publish "$PWD\src\LanguageServer\LanguageServer.csproj" -f netcoreapp3.1 -o "$PWD\out\language-server" /p:Version="$env:APPVEYOR_BUILD_VERSION" - & $dotnet publish "$PWD\src\LanguageServer.TaskReflection\LanguageServer.TaskReflection.csproj" -f netcoreapp3.0 -o "$PWD\out\task-reflection" /p:Version="$env:APPVEYOR_BUILD_VERSION" + & $dotnet publish "$PWD\src\LanguageServer.TaskReflection\LanguageServer.TaskReflection.csproj" -f netcoreapp3.1 -o "$PWD\out\task-reflection" /p:Version="$env:APPVEYOR_BUILD_VERSION" test_script: - ps: >- $dotnet = Get-Command 'dotnet' diff --git a/.vscode/launch.json b/.vscode/launch.json index 3e3af68..c280b17 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceRoot}/src/LanguageServer/bin/Debug/netcoreapp3.0/MSBuildProjectTools.LanguageServer.Host.dll", + "program": "${workspaceRoot}/src/LanguageServer/bin/Debug/netcoreapp3.1/MSBuildProjectTools.LanguageServer.Host.dll", "args": [], "cwd": "${workspaceRoot}", "stopAtEntry": true, @@ -25,7 +25,7 @@ "request": "launch", "preLaunchTask": "build", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/test/LanguageServer.Engine.Tests/bin/Debug/netcoreapp3.0/MSBuildProjectTools.LanguageServer.Engine.Tests.dll", + "program": "${workspaceFolder}/test/LanguageServer.Engine.Tests/bin/Debug/netcoreapp3.1/MSBuildProjectTools.LanguageServer.Engine.Tests.dll", "args": [], "cwd": "${workspaceFolder}/test/LanguageServer.Engine.Tests", // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b9b7e4..1ee0f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 0.3.11 + +* Upgrade the language service to use the .NET Core 3.1 runtime (tintoy/msbuild-project-tools-server#20). + ## 0.3.10 * Always use the MSBuild engine from the newest version of the .NET Core SDK (tintoy/msbuild-project-tools-server#19). diff --git a/README.md b/README.md index bbb86bb..7863759 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ An [LSP](https://github.com/Microsoft/language-server-protocol)-compatible langu For more information, see [msbuild-project-tools-vscode](https://github.com/tintoy/msbuild-project-tools-vscode). -You need the .NET Core runtime v3.0.0 (or SDK v3.0.1xx) or newer installed to use the language service (but your projects can target any version you have installed). +**Note**: You will need the .NET Core **runtime v3.1.3 (or SDK v3.1.1xx) or newer** installed to use the language service (but your projects can target any version you have installed). ## Building from source diff --git a/build.ps1 b/build.ps1 index 85db618..bf71fda 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,4 +1,4 @@ $dotnet = Get-Command 'dotnet' -& $dotnet publish "$PSScriptRoot\src\LanguageServer\LanguageServer.csproj" -f netcoreapp3.0 -o "$PSScriptRoot\out\language-server" -& $dotnet publish "$PSScriptRoot\src\LanguageServer.TaskReflection\LanguageServer.TaskReflection.csproj" -f netcoreapp3.0 -o "$PSScriptRoot\out\task-reflection" +& $dotnet publish "$PSScriptRoot\src\LanguageServer\LanguageServer.csproj" -f netcoreapp3.1 -o "$PSScriptRoot\out\language-server" +& $dotnet publish "$PSScriptRoot\src\LanguageServer.TaskReflection\LanguageServer.TaskReflection.csproj" -f netcoreapp3.1 -o "$PSScriptRoot\out\task-reflection" diff --git a/build.sh b/build.sh index 6852829..7c7b57a 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,9 @@ #!/bin/bash echo 'Building language server...' -dotnet publish src/LanguageServer/LanguageServer.csproj -f netcoreapp3.0 -o $PWD/out/language-server +dotnet publish src/LanguageServer/LanguageServer.csproj -f netcoreapp3.1 -o $PWD/out/language-server echo 'Building task scanner...' -dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp3.0 -o $PWD/out/task-reflection +dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp3.1 -o $PWD/out/task-reflection echo 'Done.' diff --git a/docs/BUILDING.md b/docs/BUILDING.md index a3aab98..079a43b 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -7,6 +7,6 @@ You'll need: To build: 1. `dotnet restore` -3. `dotnet publish src/LanguageServer/LanguageServer.csproj -f netcoreapp3.0 -o $PWD/out/language-server` -3. `dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp3.0 -o $PWD/out/task-reflection` +3. `dotnet publish src/LanguageServer/LanguageServer.csproj -f netcoreapp3.1 -o $PWD/out/language-server` +3. `dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp3.1 -o $PWD/out/task-reflection` diff --git a/src/LanguageServer.Common/LanguageServer.Common.csproj b/src/LanguageServer.Common/LanguageServer.Common.csproj index 3035dfa..8927ec5 100644 --- a/src/LanguageServer.Common/LanguageServer.Common.csproj +++ b/src/LanguageServer.Common/LanguageServer.Common.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + netcoreapp3.1 MSBuildProjectTools.LanguageServer.Common MSBuildProjectTools.LanguageServer diff --git a/src/LanguageServer.Engine/CompletionProviders/PropertyElementCompletion.cs b/src/LanguageServer.Engine/CompletionProviders/PropertyElementCompletion.cs index 03e2b54..a2e53a0 100644 --- a/src/LanguageServer.Engine/CompletionProviders/PropertyElementCompletion.cs +++ b/src/LanguageServer.Engine/CompletionProviders/PropertyElementCompletion.cs @@ -165,7 +165,7 @@ public IEnumerable GetCompletionItems(ProjectDocument projectDoc SortText = Priority + "", TextEdit = new TextEdit { - NewText = "${1|netstandard1.0,netstandard1.1,netstandard1.2,netstandard1.3,netstandard1.4,netstandard1.5,netstandard1.6,netstandard2.0,netcoreapp1.0,netcoreapp1.1,netcoreapp3.0,net4,net451,net452,net46,net461,net462,net47|}", + NewText = "${1|netstandard1.0,netstandard1.1,netstandard1.2,netstandard1.3,netstandard1.4,netstandard1.5,netstandard1.6,netstandard2.0,netcoreapp1.0,netcoreapp1.1,netcoreapp3.0,netcoreapp3.1,net4,net451,net452,net46,net461,net462,net47,net5|}", Range = replaceRangeLsp }, InsertTextFormat = InsertTextFormat.Snippet diff --git a/src/LanguageServer.Engine/LanguageServer.Engine.csproj b/src/LanguageServer.Engine/LanguageServer.Engine.csproj index 4feb843..c076ae8 100644 --- a/src/LanguageServer.Engine/LanguageServer.Engine.csproj +++ b/src/LanguageServer.Engine/LanguageServer.Engine.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + netcoreapp3.1 MSBuildProjectTools.LanguageServer.Engine MSBuildProjectTools.LanguageServer diff --git a/src/LanguageServer.SemanticModel.MSBuild/LanguageServer.SemanticModel.MSBuild.csproj b/src/LanguageServer.SemanticModel.MSBuild/LanguageServer.SemanticModel.MSBuild.csproj index 19a0525..a709f8c 100644 --- a/src/LanguageServer.SemanticModel.MSBuild/LanguageServer.SemanticModel.MSBuild.csproj +++ b/src/LanguageServer.SemanticModel.MSBuild/LanguageServer.SemanticModel.MSBuild.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + netcoreapp3.1 MSBuildProjectTools.LanguageServer.SemanticModel.MSBuild MSBuildProjectTools.LanguageServer.SemanticModel diff --git a/src/LanguageServer.SemanticModel.Xml/LanguageServer.SemanticModel.Xml.csproj b/src/LanguageServer.SemanticModel.Xml/LanguageServer.SemanticModel.Xml.csproj index fefc6af..bea6dc4 100644 --- a/src/LanguageServer.SemanticModel.Xml/LanguageServer.SemanticModel.Xml.csproj +++ b/src/LanguageServer.SemanticModel.Xml/LanguageServer.SemanticModel.Xml.csproj @@ -1,7 +1,7 @@ - netcoreapp3.0 + netcoreapp3.1 MSBuildProjectTools.LanguageServer.SemanticModel.Xml MSBuildProjectTools.LanguageServer.SemanticModel diff --git a/src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj b/src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj index b5d9e23..a49decf 100644 --- a/src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj +++ b/src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj @@ -1,7 +1,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 MSBuildProjectTools.LanguageServer.TaskReflection MSBuildProjectTools.LanguageServer.TaskReflection diff --git a/src/LanguageServer/LanguageServer.csproj b/src/LanguageServer/LanguageServer.csproj index 19afd0b..4a2b9c1 100644 --- a/src/LanguageServer/LanguageServer.csproj +++ b/src/LanguageServer/LanguageServer.csproj @@ -1,7 +1,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 MSBuildProjectTools.LanguageServer.Host MSBuildProjectTools.LanguageServer.Host diff --git a/test/LanguageServer.Engine.Tests/LanguageServer.Engine.Tests.csproj b/test/LanguageServer.Engine.Tests/LanguageServer.Engine.Tests.csproj index 67ce499..5887ebd 100644 --- a/test/LanguageServer.Engine.Tests/LanguageServer.Engine.Tests.csproj +++ b/test/LanguageServer.Engine.Tests/LanguageServer.Engine.Tests.csproj @@ -1,6 +1,6 @@ - netcoreapp3.0 + netcoreapp3.1 false MSBuildProjectTools.LanguageServer.Tests MSBuildProjectTools.LanguageServer.Engine.Tests diff --git a/test/LanguageServer.Engine.Tests/TaskScannerTests.cs b/test/LanguageServer.Engine.Tests/TaskScannerTests.cs index 17cdf87..3516418 100644 --- a/test/LanguageServer.Engine.Tests/TaskScannerTests.cs +++ b/test/LanguageServer.Engine.Tests/TaskScannerTests.cs @@ -92,7 +92,7 @@ static TaskScannerTests() MSBuildTaskScanner.TaskReflectorAssemblyFile = new FileInfo( Path.Combine( Path.GetDirectoryName(typeof(TaskScannerTests).Assembly.Location), - "..", "..", "..", "..", "..", "src", "LanguageServer.TaskReflection", "bin", "debug", "netcoreapp3.0", + "..", "..", "..", "..", "..", "src", "LanguageServer.TaskReflection", "bin", "debug", "netcoreapp3.1", "MSBuildProjectTools.LanguageServer.TaskReflection.dll" ) );