Skip to content

Commit

Permalink
Fix netcoreapp3.0 builds (#2359)
Browse files Browse the repository at this point in the history
* Fix netcoreapp3.0 builds for real

* Use same nuget package versions for all targets.

* Add comment

* Fix tests.
  • Loading branch information
timcassell committed Jul 10, 2023
1 parent 2785495 commit e85fe28
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 13 deletions.
9 changes: 3 additions & 6 deletions src/BenchmarkDotNet/BenchmarkDotNet.csproj
Expand Up @@ -24,19 +24,16 @@
<PackageReference Include="Perfolizer" Version="[0.2.1]" />
<PackageReference Include="Microsoft.Diagnostics.Tracing.TraceEvent" Version="3.0.2" PrivateAssets="contentfiles;analyzers" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
<!-- Do not update these packages, or else netcoreapp3.0 and older will no longer work -->
<PackageReference Include="System.Management" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.Management" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="System.Management" Version="6.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(UseMonoRuntime)' != 'true' ">
<ProjectReference Include="..\BenchmarkDotNet.Disassembler.x64\BenchmarkDotNet.Disassembler.x64.csproj">
Expand Down
Expand Up @@ -14,7 +14,7 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<Reference Include="System.Runtime" />
</ItemGroup>
</Project>
Expand Up @@ -14,7 +14,7 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<Reference Include="System.Runtime" />
</ItemGroup>

Expand Down
Expand Up @@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<Reference Include="System.Runtime" />
</ItemGroup>
</Project>
Expand Up @@ -16,7 +16,7 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<Reference Include="System.Runtime" />
</ItemGroup>
</Project>
Expand Up @@ -14,7 +14,7 @@
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<Reference Include="System.Runtime" />
</ItemGroup>
</Project>
Expand Up @@ -46,7 +46,7 @@
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<ProjectReference Include="..\..\src\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />
<ProjectReference Include="..\BenchmarkDotNet.IntegrationTests.CustomPaths\BenchmarkDotNet.IntegrationTests.CustomPaths.csproj" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<Reference Include="System.Configuration" />
<Reference Include="System.Runtime" />
Expand Down
2 changes: 1 addition & 1 deletion tests/BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj
Expand Up @@ -25,7 +25,7 @@
</ItemGroup>
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<ProjectReference Include="..\..\src\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="2.2.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.0" />
<PackageReference Include="System.Memory" Version="4.5.5" />
<Reference Include="System.Runtime" />
<Reference Include="System.Threading.Tasks" />
Expand Down

0 comments on commit e85fe28

Please sign in to comment.