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
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
git tag --list
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.201'
dotnet-version: '5.0.100'
source-url: https://nuget.pkg.github.com/elastic/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DefineConstants Condition="$(DefineConstants.Contains(FULLFRAMEWORK)) == False">$(DefineConstants);DOTNETCORE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="2.2.0" PrivateAssets="all" />
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net461" Version="1.0.0" PrivateAssets="all"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/Elastic.Transport.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ private static void Main(string[] args)
{
var config = ManualConfig
.Create(DefaultConfig.Instance)
.With(MemoryDiagnoser.Default)
.With(new SummaryStyle(false, SizeUnit.B, null));
.AddDiagnoser(MemoryDiagnoser.Default)
.WithSummaryStyle(new SummaryStyle(null, false, SizeUnit.B, null));

BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config);
}
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"isRoot": true,
"tools": {
"minver-cli": {
"version": "2.2.0",
"version": "2.3.1",
"commands": [
"minver"
]
},
"assembly-differ": {
"version": "0.12.5",
"version": "0.13.0",
"commands": [
"assembly-differ"
]
},
"release-notes": {
"version": "0.2.3",
"version": "0.3.0",
"commands": [
"release-notes"
]
},
"nupkg-validator": {
"version": "0.3.1",
"version": "0.4.0",
"commands": [
"nupkg-validator"
]
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "3.1.200",
"version": "5.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
11 changes: 5 additions & 6 deletions tests/Elastic.Transport.Tests/Elastic.Transport.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>

<TargetFramework>net5.0</TargetFramework>
<IsTestProject>True</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="Nullean.VsTest.Pretty.TestLogger" Version="0.3.0" />
<PackageReference Include="JunitXml.TestLogger" Version="2.1.78" />

Expand Down