ionide / ionide/FsAutoComplete

dotnet binary could not be found

Open
#1,338 5 comments 0 reactions 0 assignees View on GitHub
bug proj-info
Dominant language
F#
Stars
486
Forks
169
Avg merge
2d 8h
Merged PRs (30d)
5

Description

### Version

0.75.0

### Dotnet Info
```
❯ dotnet --info
.NET SDK:
Version: 9.0.100
Commit: a2bc464e40
Workload version: 9.0.100-manifests.6bf02610
MSBuild version: 17.12.7+a2bc464e4

Runtime Environment:
OS Name: FreeBSD
OS Version: 14
OS Platform: FreeBSD
RID: freebsd.14-x64
Base Path: /usr/local/dotnet/sdk/9.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.0
Architecture: x64
Commit: a2bc464e40
.NET SDKs installed:
8.0.106 [/usr/local/dotnet/sdk]
9.0.100 [/usr/local/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.6 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/local/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [/usr/local/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None

Environment variables:
DOTNET_ROOT [/usr/local/dotnet]

global.json file:
Not found

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

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

### Steps to reproduce

`fsautocomplete` produces the following output:

```
Unhandled exception: System.Exception: No dotnet binary could be found via the DOTNET_HOST_PATH or DOTNET_ROOT environment variables, the PATH environment variable, or the default install locations
at Ionide.ProjInfo.Init.init(DirectoryInfo workingDirectory, FSharpOption`1 dotnetExe) in /_//src/Ionide.ProjInfo/Library.fs:line 302
at FsAutoComplete.Parser.rootCommand@132-1.Invoke(Boolean projectGraphEnabled, DirectoryInfo stateDirectory, Boolean adaptiveLspEnabled, Boolean useTransparentCompiler) in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/Parser.fs:line 152
at System.CommandLine.Handler.<>c__DisplayClass16_0`4.b__0(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.SyncUsingAsync(InvocationContext context)
at System.CommandLine.Invocation.AnonymousCommandHandler.Invoke(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at FsAutoComplete.Parser.serilogFlush@341-1.MoveNext() in /home/runner/work/FsAutoComplete/FsAutoComplete/src/FsAutoComplete/Parser.fs:line 342
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
```

### Details

It says it cannot find dotnet binary. However, `dotnet` is in my path; moreover

```
❯ $DOTNET_ROOT/dotnet --version
9.0.100
```

Or does it refer to `dotnet-fsautocomplete`? I do not have this one; I installed `fsautocomplete` with `dotnet tool install -g fsautocomplete`.

I am running FreeBSD 14.2; I have installed `dotnet8` and `dotnet` packages.

### Logs

_No response_

### Checklist

- [x] I have looked through existing issues to make sure that this bug has not been reported before
- [x] I have provided a descriptive title for this issue
- [x] I have made sure that that this bug is reproducible on the latest version of the package
- [x] I have provided all the information needed to reproduce this bug as efficiently as possible
- [ ] I or my company would be willing to contribute this fix

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.