You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our current setup, we publish our project as a "dotnet tool". Recently we've had a customer ask that we publish it as a "Dependency" as well, so they can take a standard dependency on it in their project setup.
/tmp/3x3ko4cy.ns2/restore.csproj : error NU1102: Unable to find package Microsoft.CognitiveServices.Speech with version (= <version.num>)
/tmp/3x3ko4cy.ns2/restore.csproj : error NU1102: - Found 32 version(s) in nuget.org [ Nearest version: 1.22.0 ]
/tmp/3x3ko4cy.ns2/restore.csproj : error NU1102: - Found 0 version(s) in /mnt/vss/_work/1/s
The tool package could not be restored.
Tool 'microsoft.cognitiveservices.speech.cli' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool
The text was updated successfully, but these errors were encountered:
According to NuGet/Home#6298 (comment), packages can have multiple types in general, but the DotnetTool package type does not allow other types. Not sure whether that is in any maintained documentation.
The SDK-bundled tool packaging targets could also do some validation here - throwing an error if you're trying to pack a tool with multiple PackageTypes. We already have a validation target that would be a natural place for it.
This sounds like a bug to me. I think for dotnet tool, the package types must include DotnetTool and only report an error if it does not contain DotnetTool.
Describe the bug
In our current setup, we publish our project as a "dotnet tool". Recently we've had a customer ask that we publish it as a "Dependency" as well, so they can take a standard dependency on it in their project setup.
The NuGet docs specify that one or more types are supported so I updated our package, but now installation via dotnet tool fails. (error output below)
Are multiple package types not supported by dotnet tool?
To Reproduce
Modified property in our *.csproj file to:
<PackageType>Dependency;DotnetTool</PackageType>
Attempted install command:
Exceptions (if any)
Error output:
The text was updated successfully, but these errors were encountered: