Skip to content

Commit

Permalink
Upgrade the language service to use the .NET Core 3.1 runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Nov 29, 2020
1 parent 20cf38d commit de892dd
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.3.9.{build}
version: 0.3.11.{build}
image: Visual Studio 2019
build_script:
- ps: >-
Expand All @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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.'
4 changes: 2 additions & 2 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

2 changes: 1 addition & 1 deletion src/LanguageServer.Common/LanguageServer.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>MSBuildProjectTools.LanguageServer.Common</AssemblyName>
<RootNamespace>MSBuildProjectTools.LanguageServer</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public IEnumerable<CompletionItem> GetCompletionItems(ProjectDocument projectDoc
SortText = Priority + "<TargetFramework>",
TextEdit = new TextEdit
{
NewText = "<TargetFramework>${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|}</TargetFramework>",
NewText = "<TargetFramework>${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|}</TargetFramework>",
Range = replaceRangeLsp
},
InsertTextFormat = InsertTextFormat.Snippet
Expand Down
2 changes: 1 addition & 1 deletion src/LanguageServer.Engine/LanguageServer.Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>

<AssemblyName>MSBuildProjectTools.LanguageServer.Engine</AssemblyName>
<RootNamespace>MSBuildProjectTools.LanguageServer</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>MSBuildProjectTools.LanguageServer.SemanticModel.MSBuild</AssemblyName>
<RootNamespace>MSBuildProjectTools.LanguageServer.SemanticModel</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>MSBuildProjectTools.LanguageServer.SemanticModel.Xml</AssemblyName>
<RootNamespace>MSBuildProjectTools.LanguageServer.SemanticModel</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>MSBuildProjectTools.LanguageServer.TaskReflection</AssemblyName>
<RootNamespace>MSBuildProjectTools.LanguageServer.TaskReflection</RootNamespace>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/LanguageServer/LanguageServer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>MSBuildProjectTools.LanguageServer.Host</AssemblyName>
<RootNamespace>MSBuildProjectTools.LanguageServer.Host</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>MSBuildProjectTools.LanguageServer.Tests</RootNamespace>
<AssemblyName>MSBuildProjectTools.LanguageServer.Engine.Tests</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion test/LanguageServer.Engine.Tests/TaskScannerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
);
Expand Down

0 comments on commit de892dd

Please sign in to comment.