Skip to content

Commit

Permalink
Language server now targets netcoreapp3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Oct 31, 2019
1 parent 0800e6c commit e44256f
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 0.2.55.{build}
image: Visual Studio 2017
version: 0.3.1.{build}
image: Visual Studio 2019
build_script:
- ps: >-
Remove-Item .\global.json
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 netcoreapp2.0 -o "$PWD\out\language-server" /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.TaskReflection\LanguageServer.TaskReflection.csproj" -f netcoreapp2.0 -o "$PWD\out\task-reflection" /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"
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/netcoreapp2.0/MSBuildProjectTools.LanguageServer.Host.dll",
"program": "${workspaceRoot}/src/LanguageServer/bin/Debug/netcoreapp3.0/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/netcoreapp2.0/MSBuildProjectTools.LanguageServer.Engine.Tests.dll",
"program": "${workspaceFolder}/test/LanguageServer.Engine.Tests/bin/Debug/netcoreapp3.0/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

## v0.3.1

* Language service now targets .NET Core 3.0 (tintoy/msbuild-project-tools-server#17).

## v0.2.55

* Improve calculation logic for MSBuild ToolsVersion (tintoy/msbuild-project-tools-server#16).
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 .NET Core 2.0.0 or newer installed to use the language service (but your projects can target any version you have installed).
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).

## 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 netcoreapp2.0 -o "$PSScriptRoot\out\language-server"
& $dotnet publish "$PSScriptRoot\src\LanguageServer.TaskReflection\LanguageServer.TaskReflection.csproj" -f netcoreapp2.0 -o "$PSScriptRoot\out\task-reflection"
& $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"
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 netcoreapp2.0 -o $PWD/out/language-server
dotnet publish src/LanguageServer/LanguageServer.csproj -f netcoreapp3.0 -o $PWD/out/language-server

echo 'Building task scanner...'
dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp2.0 -o $PWD/out/task-reflection
dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp3.0 -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 netcoreapp2.0 -o $PWD/out/language-server`
3. `dotnet publish src/LanguageServer.TaskReflection/LanguageServer.TaskReflection.csproj -f netcoreapp2.0 -o $PWD/out/task-reflection`
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`

8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.401"
}
}
"sdk": {
"version": "3.0.100"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,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,netcoreapp2.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,net4,net451,net452,net46,net461,net462,net47|}</TargetFramework>",
Range = replaceRangeLsp
},
InsertTextFormat = InsertTextFormat.Snippet
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>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.0</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>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.0</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>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>MSBuildProjectTools.LanguageServer.Tests</RootNamespace>
<AssemblyName>MSBuildProjectTools.LanguageServer.Engine.Tests</AssemblyName>
Expand Down
4 changes: 2 additions & 2 deletions test/LanguageServer.Engine.Tests/TaskScannerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public TaskScannerTests(ITestOutputHelper testOutput)
/// </param>
[InlineData("NuGet.Build.Tasks.dll")]
[InlineData("Microsoft.Build.Tasks.Core.dll")]
[InlineData("Sdks/Microsoft.NET.Sdk/tools/netcoreapp2.0/Microsoft.NET.Build.Tasks.dll")]
[InlineData("Sdks/Microsoft.NET.Sdk/tools/netcoreapp3.0/Microsoft.NET.Build.Tasks.dll")]
[Theory(DisplayName = "TaskScanner can get tasks from framework task assembly ")]
public async Task Scan_FrameworkTaskAssembly_Success(string fileName)
{
Expand Down Expand Up @@ -96,7 +96,7 @@ static TaskScannerTests()
MSBuildTaskScanner.TaskReflectorAssemblyFile = new FileInfo(
Path.Combine(
Path.GetDirectoryName(typeof(TaskScannerTests).Assembly.Location),
"..", "..", "..", "..", "..", "src", "LanguageServer.TaskReflection", "bin", "debug", "netcoreapp2.0",
"..", "..", "..", "..", "..", "src", "LanguageServer.TaskReflection", "bin", "debug", "netcoreapp3.0",
"MSBuildProjectTools.LanguageServer.TaskReflection.dll"
)
);
Expand Down

0 comments on commit e44256f

Please sign in to comment.