Skip to content

Installing a tool that targets a framework not installed gives a non-actionable error message. #38172

@ericstj

Description

@ericstj

Describe the bug

Attempt to install a tool that targets a framework version not present. The error message emitted complains about a missing DotNetToolSettings.xml file.

To Reproduce

dotnet tool install --global microsoft.dotnet.genapi.tool --add-source https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json --prerelease

Exceptions (if any)

Error observed:

Tool 'microsoft.dotnet.genapi.tool' failed to update due to the following:
The settings file in the tool's NuGet package is invalid: Settings file 'DotnetToolSettings.xml' was not found in the package.
Tool 'microsoft.dotnet.genapi.tool' failed to install. Contact the tool author for assistance.

Further technical details

This was reproduced with a machine that didn't have net9.0 SDK installed. To fix it, you can install the SDK, or use the package from the dotnet8-transport feed instead.

The SDK should do better when installing the tool to notify the user they might need to update the SDK.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions