Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
When running dotnet tool install --local, a manifest is now created if none exists instead of failing with an error. This change was implemented by making the --create-manifest-if-needed option enabled by default. This is a breaking change, since users might have relied on the failure behavior to check if they needed to create a manifest.
The -d flag on dotnet tool install was previously added to show the locations that were searched for manifests. This information was relayed in the error given when there was no manifest. That error is no longer shown since a manifest is now created if necessary. You should no longer use the -d flag.
Version introduced
.NET 10 Preview 7
Previous behavior
Previously, if you tried to install a .NET tool as a local tool in a folder that didn't contain a manifest, you got an error:
Cannot find a manifest file.
New behavior
Starting in .NET 10, the --create-manifest-if-needed=true functionality is now enabled by default. When a tool is installed as a local tool, the manifest is created automatically if it doesn't exist. The manifest is created according to the rules described in the --create-manifest-if-needed option documentation.
Type of breaking change
This change is a behavioral change.
Reason for change
This change improves the user experience by making dotnet tool install --local work by default without requiring users to manually create a manifest first. Previously, there was a concern about creating a manifest in a working directory rather than the repository root, but the tool now puts the manifest in the repository root when possible.
Recommended action
You can turn off the automatic manifest creation behavior by passing --create-manifest-if-needed=false when calling dotnet tool install --local.
Affected APIs
N/A