Skip to content

Enable .NET 5 SDK #7

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

Merged
merged 4 commits into from
Nov 17, 2020
Merged

Enable .NET 5 SDK #7

merged 4 commits into from
Nov 17, 2020

Conversation

stevejgordon
Copy link
Collaborator

Support using newer compiler features such as Source Generators.

@stevejgordon
Copy link
Collaborator Author

Investigating failures

@stevejgordon stevejgordon changed the title Enable .NET 5 SDK [DRAFT] Enable .NET 5 SDK Nov 16, 2020
NOTE: Required update to 0.12.1 of BenchmarkDotNet to support the shortened TFM. However, this requires explicit LangVersion since latest is not current supported.
@stevejgordon stevejgordon changed the title [DRAFT] Enable .NET 5 SDK Enable .NET 5 SDK Nov 17, 2020
@@ -3,11 +3,12 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bug in 0.12.1 which means that we cannot use latest here from Directory.Build.props so temporarily fixing this to 9.0.

Once Benchmark.NET includes a fix, we can remove this after updating to that version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there already an open a ticket for this on Benchmark.NET ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's fixed and will be in 0.12.2 - dotnet/BenchmarkDotNet#1420

</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required for net5.0 TFM support.

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stevejgordon stevejgordon merged commit 3b18623 into main Nov 17, 2020
@stevejgordon stevejgordon deleted the infra/dotnet-5-sdk branch November 17, 2020 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants