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

Package coveralls.net 3.0.0 is not compatible with net5.0 (.NETCoreApp,Version=v5.0) #107

Closed
MarcosCostaDev opened this issue Aug 9, 2021 · 1 comment

Comments

@MarcosCostaDev
Copy link

I am receiving some errors during the installation process using Nuget Package Manager on Visual Studio 2019.

Invalid project-package combination for coveralls.net 3.0.0. DotnetToolReference project style can only contain references of the DotnetTool type

Follow by

Package 'coveralls.net 3.0.0' has a package type 'DotnetTool' that is not supported by project

And

Package coveralls.net 3.0.0 is not compatible with net5.0 (.NETCoreApp,Version=v5.0). Package coveralls.net 3.0.0 supports: net5.0 (.NETCoreApp,Version=v5.0) / any

this is my test project

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>

    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.8" />
    <PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
    <PackageReference Include="Moq" Version="4.16.1" />
    <PackageReference Include="xunit" Version="2.4.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="coverlet.collector" Version="3.1.0">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\TINoCanadaBot.WebHook\TINoCanadaBot.WebHook.csproj" />
  </ItemGroup>

</Project>
@csMACnz
Copy link
Owner

csMACnz commented May 7, 2022

I believe this is correct...
dotnet/sdk#9122
This new type of tool needs to be installed with dotnet tool rather than the older legacy 2.1 tools approach of using PackageReference in a csproj file.
This was a breaking change around the release of version 3.0.0 (and now version 4.0.0 as well)

https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools#install-a-local-tool
Installing of coveralls.net now follows dotnet tool install coveralls.net adding it to the dotnet-tools.json file or dotnet tool install --global coveralls.net to install it globally instead.

As far as I am aware, this kind of tool install is not supported in the Visual Studio Nuget Package Manager.

I've added notes to the readme about this difference in version 3.0.0 and version 2.0.0 already which has a bit more detail.

I hope this helps.

@csMACnz csMACnz closed this as completed May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants