I am building a dotnet core tool and I am having trouble installing it globally. I can replicate the problem I am having but don't know how to fix it. Below are my steps
- dotnet new console -o testconsole
- Modify testconsole.csproj to include
<PackAsTool>
and<PackageOutputPath>
- dotnet restore testconsole.csproj
- dotnet build testconsole.csproj
- dotnet pack testconsole.csproj
- dotnet tool install -g -v d --add-source ./nupkg testconsole
When installing I receive the below error
error NU1212: Invalid project-package combination for TestConsole 1.0.9. DotnetToolReference project style can only contain references of the DotnetTool type
Here is a copy of testconsole.nuspec from the nupkg that includes
<packageType name="DotnetTool" />
per the suggestion from https://natemcmaster.com/blog/2018/05/12/dotnet-global-tools/