From f16584ebcf1bba9d6eb97c632eded7b200a79ff2 Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 18 Sep 2017 12:42:44 +0200 Subject: [PATCH 1/3] fixed LanguageVersion assignment --- .../ProjectFile/ProjectFileInfo.ProjectData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs b/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs index e00631945e..0bda8a2bf6 100644 --- a/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs +++ b/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.ProjectData.cs @@ -68,7 +68,7 @@ public ProjectData( TargetFrameworks = targetFrameworks; OutputKind = outputKind; - LanguageVersion = LanguageVersion; + LanguageVersion = languageVersion; AllowUnsafeCode = allowUnsafeCode; DocumentationFile = documentationFile; PreprocessorSymbolNames = preprocessorSymbolNames; From f49cf9f06ec6fbdee8bde3066e0153317b6bc423 Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 18 Sep 2017 12:45:20 +0200 Subject: [PATCH 2/3] updated tests to include language version --- test-assets/test-projects/HelloWorld/HelloWorld.csproj | 1 + tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test-assets/test-projects/HelloWorld/HelloWorld.csproj b/test-assets/test-projects/HelloWorld/HelloWorld.csproj index e67ec78742..c0318399b6 100644 --- a/test-assets/test-projects/HelloWorld/HelloWorld.csproj +++ b/test-assets/test-projects/HelloWorld/HelloWorld.csproj @@ -4,6 +4,7 @@ Exe netcoreapp1.0 false + 7.1 diff --git a/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs b/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs index 71dec7dc86..3c3367b7aa 100644 --- a/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs +++ b/tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs @@ -1,5 +1,6 @@ using System.IO; using System.Threading.Tasks; +using Microsoft.CodeAnalysis.CSharp; using Microsoft.Extensions.Logging; using OmniSharp.MSBuild.ProjectFile; using OmniSharp.Services; @@ -50,6 +51,7 @@ public async Task HelloWorld_has_correct_property_values() Assert.Equal("netcoreapp1.0", projectFileInfo.TargetFrameworks[0]); Assert.Equal("bin/Debug/netcoreapp1.0/", projectFileInfo.OutputPath.Replace('\\', '/')); Assert.Equal(3, projectFileInfo.SourceFiles.Length); // Program.cs, AssemblyInfo.cs, AssemblyAttributes.cs + Assert.Equal(LanguageVersion.CSharp7_1, projectFileInfo.LanguageVersion); } } From defb37f2a4fe831a9a4ae2ec7c50173b5aa4c488 Mon Sep 17 00:00:00 2001 From: filipw Date: Mon, 18 Sep 2017 12:47:28 +0200 Subject: [PATCH 3/3] updated CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d14b1a5415..7d7e501991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All changes to the project will be documented in this file. +## [1.25.0] - not released yet + +* Fixed a bug where language version was not correctly read from .csproj projects. ([#961](https://github.com/OmniSharp/omnisharp-roslyn/issues/961)) + ## [1.24.0] - 2017-08-31 * Fixed a bug where an external code action DLL with missing dependencies would crash OmniSharp.