dotnet tool install --create-manifest-if-needed --tool-manifest does not seem to work
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Describe the bug
I have a new, empty directory I want to install tools to. I want the tool manifest at a parent directory. Using `--tool-manifest` and `--create-manifest-if-needed` does not work together (at least how I expect it to).
### To Reproduce
```powershell
cd $env:TEMP
$d = mkdir (New-Guid)
cd $d
mkdir inner
cd inner
dotnet tool install Knapcode.SampleMcpServer@0.6.0-beta --local --tool-manifest ..\.config\dotnet-tools.json
```
### Exceptions (if any)
Error:
```
Cannot find a manifest file. The list of searched paths:
C:\Users\jver\AppData\Local\Temp\a97e2039-42f0-49f7-85fb-76ab9549853d\.config\dotnet-tools.json
```
### Further technical details
details of dotnet --info
.NET SDK:
Version: 10.0.100-preview.7.25358.102
Commit: 23101ed07a
Workload version: 10.0.100-manifests.a0d9a80e
MSBuild version: 17.15.0-preview-25358-102+23101ed07
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.7.25358.102\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.
Host:
Version: 10.0.0-preview.7.25358.102
Architecture: x64
Commit: 23101ed07a
.NET SDKs installed:
8.0.412 [C:\Program Files\dotnet\sdk]
9.0.108 [C:\Program Files\dotnet\sdk]
9.0.302 [C:\Program Files\dotnet\sdk]
10.0.100-preview.6.25358.103 [C:\Program Files\dotnet\sdk]
10.0.100-preview.7.25358.102 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.6.25358.103 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.7.25358.102 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.6.25358.103 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.7.25358.102 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.6.25358.103 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.7.25358.102 [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
- The IDE (VS / VS Code/ VS4Mac) you're running on, and its version: N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.