Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 72f9ff9

Browse files
committed
Disable C# 6 features until CI/build system updated
With Visual Studio 2015 released today (woo hoo!), I expect we're going to see the number of contributors using VS2015 and C# 6 increase, which is a good thing. Unfortunately, our current build / CI system is currently limited to using the C# 5 compiler. Speaking from experience, this makes for a frustrating time when one develops a change and everything passes locally, only to submit a PR and find that it fails in CI because a C# 6 feature was being used. Until we can get our build and CI systems updated to use C# 6 (hopefully very soon), this change simply sets the LangVersion for our C# projects to C# 5 so that, even when using VS2015, attempting to build locally with C# 6 features will fail to compile. This won't prevent all possible dependencies on C# 6, but it will avert most.
1 parent d9ad8dc commit 72f9ff9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dir.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@
198198
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
199199
</PropertyGroup>
200200

201+
<!-- Temporary until build/CI system is upgraded to C# 6: disable C# 6 features -->
202+
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj' OR '$(Language)' == 'C#'">
203+
<LangVersion>5</LangVersion>
204+
</PropertyGroup>
205+
201206
<!-- Set up some common paths -->
202207
<PropertyGroup>
203208
<CommonPath>$(SourceDir)Common\src</CommonPath>

0 commit comments

Comments
 (0)