Skip to content

Commit e85fe28

Browse files
authored
Fix netcoreapp3.0 builds (#2359)
* Fix netcoreapp3.0 builds for real * Use same nuget package versions for all targets. * Add comment * Fix tests.
1 parent 2785495 commit e85fe28

File tree

8 files changed

+10
-13
lines changed

8 files changed

+10
-13
lines changed

src/BenchmarkDotNet/BenchmarkDotNet.csproj

+3-6
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,16 @@
2424
<PackageReference Include="Perfolizer" Version="[0.2.1]" />
2525
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.0.2" PrivateAssets="contentfiles;analyzers" />
2626
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
27+
<!-- Do not update these packages, or else netcoreapp3.0 and older will no longer work -->
28+
<PackageReference Include="System.Management" Version="5.0.0" />
29+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
2730
</ItemGroup>
2831
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
2932
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
3033
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
3134
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
3235
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
3336
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
34-
<PackageReference Include="System.Management" Version="5.0.0" />
35-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
36-
</ItemGroup>
37-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
38-
<PackageReference Include="System.Management" Version="6.0.0" />
39-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
4037
</ItemGroup>
4138
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(UseMonoRuntime)' != 'true' ">
4239
<ProjectReference Include="..\BenchmarkDotNet.Disassembler.x64\BenchmarkDotNet.Disassembler.x64.csproj">

tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
1515
</ItemGroup>
1616
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
17-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
17+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
1818
<Reference Include="System.Runtime" />
1919
</ItemGroup>
2020
</Project>

tests/BenchmarkDotNet.IntegrationTests.CustomPaths/BenchmarkDotNet.IntegrationTests.CustomPaths.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
1515
</ItemGroup>
1616
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
17-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
17+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
1818
<Reference Include="System.Runtime" />
1919
</ItemGroup>
2020

tests/BenchmarkDotNet.IntegrationTests.DisabledOptimizations/BenchmarkDotNet.IntegrationTests.DisabledOptimizations.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
1717
</ItemGroup>
1818
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
19-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
19+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
2020
<Reference Include="System.Runtime" />
2121
</ItemGroup>
2222
</Project>

tests/BenchmarkDotNet.IntegrationTests.EnabledOptimizations/BenchmarkDotNet.IntegrationTests.EnabledOptimizations.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
1717
</ItemGroup>
1818
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
19-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
19+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
2020
<Reference Include="System.Runtime" />
2121
</ItemGroup>
2222
</Project>

tests/BenchmarkDotNet.IntegrationTests.Static/BenchmarkDotNet.IntegrationTests.Static.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
1515
</ItemGroup>
1616
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
17-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
17+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
1818
<Reference Include="System.Runtime" />
1919
</ItemGroup>
2020
</Project>

tests/BenchmarkDotNet.IntegrationTests/BenchmarkDotNet.IntegrationTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
4747
<ProjectReference Include="..\..\src\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />
4848
<ProjectReference Include="..\BenchmarkDotNet.IntegrationTests.CustomPaths\BenchmarkDotNet.IntegrationTests.CustomPaths.csproj" />
49-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
49+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
5050
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
5151
<Reference Include="System.Configuration" />
5252
<Reference Include="System.Runtime" />

tests/BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</ItemGroup>
2626
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
2727
<ProjectReference Include="..\..\src\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />
28-
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
28+
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
2929
<PackageReference Include="System.Memory" Version="4.5.5" />
3030
<Reference Include="System.Runtime" />
3131
<Reference Include="System.Threading.Tasks" />

0 commit comments

Comments
 (0)