`dotnet tool restore` cannot find the local manifest file
See original GitHub issueDescribe the bug
After upgrading dotnet to 7.0.9, dotnet tool restore
cannot find the manifest file in .config/dotnet-tools.json
It returns:
Cannot find a manifest file.
For a list of locations searched, specify the "-d" option before the tool name.
No tools were restored.
Running dotnet new tool-manifest
will reset the manifest file and after adding the tools it still do not pick those tools up.
Affected platforms
This only happens on Windows. MacOS seems to work. Have not tried linux.
To Reproduce
- Run
dotnet new tool-manifest
- Add a tool. See example below. (running
dotnet tool install Cake.Tool --version 3.1.0
will also fail with same error) - Run
dotnet tool restore
.config/dotnet-tools.json
{
"version": 1,
"isRoot": true,
"tools": {
"cake.tool": {
"version": "3.1.0",
"commands": [
"dotnet-cake"
]
}
}
}
Further technical details
dotnet --info
.NET SDK:
Version: 7.0.306
Commit: f500069cb7
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.306\
Host:
Version: 7.0.9
Architecture: x64
Commit: 8e9a17b221
.NET SDKs installed:
5.0.405 [C:\Program Files\dotnet\sdk]
7.0.103 [C:\Program Files\dotnet\sdk]
7.0.304 [C:\Program Files\dotnet\sdk]
7.0.306 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Issue Analytics
- State:
- Created 2 months ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
When installing a .NET local tool, create the tool manifest if ...
When a user tries to install a .NET tool as a local tool on a folder that does not contain the manifest, we...
Read more >Tutorial: Install and use .NET local tools - .NET CLI
To install all of the tools listed in the manifest file, they can run a single dotnet tool restore command. Save your changes....
Read more >.NET Tools - Cannot find a manifest file
However when I tried to install a specific tool locally, it failed with the following error message: “Cannot find a manifest file.” dotnet...
Read more >Cannot list Entity Framework Migrations in Visual Studio ...
I tried to understand what is wrong. dotnet tool restore. Cannot find a manifest file. For a list of locations searched, specify the...
Read more >.NET core local tools are here! - Bilal Fazlani
You can create a manifest file by running dotnet new tool-manifest . This will create a .config directory and inside it, an empty...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JL03-Yue can you take a look at this? It might be related to your recent fix.
The breaking change document Tool manifests in root folder mentions that the original behaviour can be restored by setting the
DOTNET_TOOLS_ALLOW_MANIFEST_IN_ROOT
environment variable.