Install dotnet tool as library

201 Views Asked by At

I have a library packaged as tool. I use that same library as a regular project in the solution. I would like to use the nuget package also as library, but it seems that went it has been packaged as tool, it cannot be used as library.

error: NU1202: Package blahblah.client 0.0.1 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package blahblah.client 0.0.1 supports: net6.0 (.NETCoreApp,Version=v6.0) / any
error: NU1212: Invalid project-package combination for blahblah.client 0.0.1. DotnetToolReference project style can only contain references of the DotnetTool type
error: Package 'blahblah.client' is incompatible with 'all' frameworks in project '/Users/me/test/test.csproj'.

Is there a way to package it as both, library and tool?

0

There are 0 best solutions below