Skip to content

Commit 852bb8c

Browse files
authored
.NET Core 2.1 -> .NET 5.0 (#1637)
* use httpS * update project files to net5.0 * don't use CLASSIC and CORE #if defines * enable ThreadingDiagnoserTests tests that were disabled so far (APIs not available prior to .NET Core 3) * update samples * update remaining tests * get warnings to 0 * update build scripts * fix MultipleRuntimesTest (.NET Core is not called Core anymore ;) ) * disable ThreadingDiagnoserTests for the InProcessToolchain * disable the failing CoreRT tests * disable some MemoryDiagnoser tests due to #1542
1 parent a7af815 commit 852bb8c

File tree

38 files changed

+60
-81
lines changed

38 files changed

+60
-81
lines changed

azure-pipelines.Ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
scriptFileName: ./build.sh
1616
initialization:
1717
- bash: |
18-
echo "deb http://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list
19-
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
18+
echo "deb https://llvm.org/apt/xenial/ llvm-toolchain-xenial-3.9 main" | sudo tee /etc/apt/sources.list.d/llvm.list
19+
wget -O - https://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
2020
sudo apt-get update
2121
- bash: |
2222
sudo apt-get install cmake clang-3.9 libicu55 uuid-dev libcurl4-openssl-dev zlib1g-dev libkrb5-dev

build.cake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ Task("FastTests")
121121
.Does(() =>
122122
{
123123
string[] targetVersions = IsRunningOnWindows() ?
124-
new []{"net461", "netcoreapp2.1"}
124+
new []{"net461", "net5.0"}
125125
:
126-
new []{"netcoreapp2.1"};
126+
new []{"net5.0"};
127127

128128
foreach(var version in targetVersions)
129129
{
@@ -144,7 +144,7 @@ Task("SlowTestsNetCore2")
144144
.WithCriteria(!skipTests)
145145
.Does(() =>
146146
{
147-
DotNetCoreTest(integrationTestsProjectPath, GetTestSettingsParameters("netcoreapp2.1"));
147+
DotNetCoreTest(integrationTestsProjectPath, GetTestSettingsParameters("net5.0"));
148148
});
149149

150150
Task("Pack")

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Param(
3232
)
3333

3434
$CakeVersion = "0.37.0"
35-
$DotNetVersion = "2.1.503";
35+
$DotNetVersion = "5.0.101";
3636
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
3737
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
3838

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
4747
mkdir "$SCRIPT_DIR/.dotnet"
4848
fi
4949
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh
50-
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 2.1.503 --install-dir .dotnet --no-path
50+
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version 5.0.101 --install-dir .dotnet --no-path
5151
export PATH="$SCRIPT_DIR/.dotnet":$PATH
5252
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
5353
export DOTNET_CLI_TELEMETRY_OPTOUT=1

build/common.props

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingStyle.ruleset</CodeAnalysisRuleSet>
2121
</PropertyGroup>
2222

23-
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And $(TargetFramework.StartsWith('net4')) ">
24-
<DefineConstants>$(DefineConstants);CLASSIC</DefineConstants>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And ('$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp2.1') ">
27-
<DefineConstants>$(DefineConstants);CORE</DefineConstants>
28-
</PropertyGroup>
29-
3023
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
3124
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)strongNameKey.snk</AssemblyOriginatorKeyFile>
3225
<SignAssembly>true</SignAssembly>

docs/_changelog/ChangeLogBuilder/ChangeLogBuilder.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
<LangVersion>7.1</LangVersion>
66
</PropertyGroup>
77
<ItemGroup>

samples/BenchmarkDotNet.Samples.FSharp/BenchmarkDotNet.Samples.FSharp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66
<PropertyGroup>
77
<OutputType>Exe</OutputType>
8-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
8+
<TargetFrameworks>net461;net5.0</TargetFrameworks>
99
</PropertyGroup>
1010
<ItemGroup>
1111
<Compile Include="Program.fs" />

samples/BenchmarkDotNet.Samples.FSharp/Program.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type StringKeyComparison () =
3434
[<Benchmark>]
3535
member self.OrdinalLookup () = lookup arr dict2
3636

37-
#if !NETCOREAPP2_1
37+
#if NETFRAMEWORK
3838
[<BenchmarkDotNet.Diagnostics.Windows.Configs.TailCallDiagnoser>]
3939
#endif
4040
type TailCallDetector () =

samples/BenchmarkDotNet.Samples/BenchmarkDotNet.Samples.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet.Samples</AssemblyTitle>
5-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net461;net5.0</TargetFrameworks>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<AssemblyName>BenchmarkDotNet.Samples</AssemblyName>
88
<OutputType>Exe</OutputType>

samples/BenchmarkDotNet.Samples/IntroDisassemblyAllJits.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ public MultipleJits()
2121

2222
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithRuntime(ClrRuntime.Net461));
2323

24-
// RyuJit for .NET Core 2.0
25-
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithRuntime(CoreRuntime.Core20));
26-
27-
// RyuJit for .NET Core 2.1
28-
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithRuntime(CoreRuntime.Core21));
24+
// RyuJit for .NET Core 5.0
25+
AddJob(Job.ShortRun.WithJit(Jit.RyuJit).WithPlatform(Platform.X64).WithRuntime(CoreRuntime.Core50));
2926

3027
AddDiagnoser(new DisassemblyDiagnoser(new DisassemblyDiagnoserConfig(maxDepth: 3, exportDiff: true)));
3128
}

0 commit comments

Comments
 (0)