Skip to content
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

[BUG] Coverlet.MSBuild 6.0.1/6.0.2 is not compatible with .NET Core 2.2 #1643

Open
fbuser1 opened this issue Mar 17, 2024 · 1 comment
Open
Labels
needs more info More details are needed question This issue is a question waiting for customer Waiting for customer action

Comments

@fbuser1
Copy link

fbuser1 commented Mar 17, 2024

Describe the bug
Coverlet.MSBuild 6.0.2 is not compatible with .NET Core 2.2, and it causes errors with another package, Newtonsoft.Json

/root/.nuget/packages/coverlet.msbuild/6.0.2/build/coverlet.msbuild.targets(72,5): error : Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)

To Reproduce
Just include coverlet.msbuild to any netcoreapp2.2 project

<Project Sdk="Microsoft.NET.Sdk">
	<PropertyGroup>
		<TargetFramework>netcoreapp2.2</TargetFramework>
		<IsPackable>false</IsPackable>
	</PropertyGroup>
	<ItemGroup>
		<PackageReference Include="AutoFixture" Version="4.8.0" />
		<PackageReference Include="coverlet.msbuild" Version="2.6.0">
       </ItemGroup>

Expected behavior
Do not download incompatible package. The latest compatible net core 2.2 package version is 6.0.0.

Actual behavior
/root/.nuget/packages/coverlet.msbuild/6.0.2/build/coverlet.msbuild.targets(72,5): error : Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)

Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used?
I am specifying 2.6.0, but it keeps to download not compatible version 6.0.2
* Which version of .NET is the code running on?
net core 2.2
* What OS and version, and what distro if applicable?
Debian GNU/Linux 9 (stretch) from mcr.microsoft.com/dotnet/core/aspnet:2.2 image
* What is the architecture (x64, x86, ARM, ARM64)?
x64

@github-actions github-actions bot added the untriaged To be investigated label Mar 17, 2024
@fbuser1 fbuser1 changed the title [BUG] Coverlet.MSBuild 6.0.2 is not compatible with .NET Core 2.2 [BUG] Coverlet.MSBuild 6.0.1/6.0.2 is not compatible with .NET Core 2.2 Mar 17, 2024
@Bertk Bertk added question This issue is a question needs more info More details are needed and removed untriaged To be investigated labels Apr 9, 2024
@Bertk
Copy link
Collaborator

Bertk commented Apr 9, 2024

Please provide additional information e.g. are you using coverlet in a test project.

By the way, this line is in code snipped is invalid <PackageReference Include="coverlet.msbuild" Version="2.6.0">

Note: netcoreapp2.2 is out of support. Currently supported .NET frameworks are net6.0, net7.0, net8.0. .NET Core 2.2 end of support date was December 23, 2019. Newtonsoft.Json package versions before V13.0.1 have a high severe vulnerability.

I did not install the unsupported .NET core 2.2 on my system but please try to use latest version of Newtonsoft.Json V13.0.3 package and add Microsoft.NET.Test.Sdk V17.3.3.

@Bertk Bertk added the waiting for customer Waiting for customer action label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info More details are needed question This issue is a question waiting for customer Waiting for customer action
Projects
None yet
Development

No branches or pull requests

2 participants