dotnet / dotnet/sdk

dotnet-format.dll not found

Open
#56,244 1 comment 0 reactions 1 assignee Claimed by @marcpopMSFT View on GitHub
Area-dotnetup Bug
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Prerequisites

- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3AArea-dotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).

### Issue type

Bug report

### Description

I installed the dotnet-format package using `dotnet tool -g install`, but I cannot use/call this tool when invoked via `dotnet format --help`. This is the error message I get:

```
The application to execute does not exist: '/home//.local/share/dotnetup/dotnet/DotnetTools/dotnet-format/dotnet-format.dll'
```

The interesting thing is that `dotnet format` itself does work. My assumption is that `--help` gets handled differently and that the DLL resolution doesn't take the SDK version into account and instead uses `/home//.local/share/dotnetup/dotnet/` as base. I'm not sure whether this is a `dotnetup` or a `dotnet` problem.

## `dotnet --info`

```
.NET SDK:
Version: 11.0.100-rc.1.26425.128
Commit: 3551975be0
Workload version: 11.0.100-manifests.a6e318ce
MSBuild version: 18.11.0-1.26425.128+3551975be

Runtime Environment:
OS Name: cachyos
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /home//.local/share/dotnetup/dotnet/sdk/11.0.100-rc.1.26425.128

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 11.0.0-rc.1.26425.128
Architecture: x64
Commit: 3551975be0

.NET SDKs installed:
10.0.401 [/home//.local/share/dotnetup/dotnet/sdk]
11.0.100-rc.1.26425.128 [/home//.local/share/dotnetup/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.12 [/home//.local/share/dotnetup/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 11.0.0-rc.1.26425.128 [/home//.local/share/dotnetup/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.12 [/home//.local/share/dotnetup/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 11.0.0-rc.1.26425.128 [/home//.local/share/dotnetup/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_ROOT [/home//.local/share/dotnetup/dotnet]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
```

### dotnetup version

0.2.0-preview.1.26410.1+a8ceef760e10c4fc14d1fface4454201b505d19a

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.