Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed LanguageVersion assignment #962

Merged
merged 4 commits into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ProjectData(
TargetFrameworks = targetFrameworks;

OutputKind = outputKind;
LanguageVersion = LanguageVersion;
LanguageVersion = languageVersion;
AllowUnsafeCode = allowUnsafeCode;
DocumentationFile = documentationFile;
PreprocessorSymbolNames = preprocessorSymbolNames;
Expand Down
1 change: 1 addition & 0 deletions test-assets/test-projects/HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<LangVersion>7.1</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions tests/OmniSharp.MSBuild.Tests/ProjectFileInfoTests.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}
}

Expand Down