Cannot recognize dotnet version. Says dotnet need to be updated.
Environments:
- CSharpier Version: 0.30.6
- Running CSharpier via: cli
- Operating System: Arch Linux
- .csharpierrc Settings:
- .editorconfig Settings:
Steps to reproduce:
- Install csharpier.
- Try running dotnet-csharpier .
Expected behavior: Csharpier formats files.
Actual behavior: Reports and error that I need to install or update dotnet. I already have the latest dotnet version installed (9.0.103) installed.
You must install or update .NET to run this application.
App: /home/samo/.dotnet/tools/dotnet-csharpier
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '9.0.0' (x64)
.NET location: /usr/share/dotnet
No frameworks were found.
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=9.0.0&arch=x64&rid=arch-x64&os=arch
I believe this has to do with CSharpier referencing aspnetcor so that it can run as an http server for the IDE plugins. That was added in 0.29 or 0.30.
The last link in the error message does allow me to download the AspNetCore runtime for windows, I assume there would be a different one for Linux.
Long term I can look into trying to break the CSharpier Server part of the code out from the CLI, this was an unintended consequence of the change.
Hi. Just wanted to mention that I also ran into this right now. Only after finding this GH issue and installing the aspnet-runtime package on my Arch system did I get CSharpier running. A fix would probably be nice but at least an info in the Installation doc would be helpful, because to me the error seemed like some kind of false positive, telling me that I have to install .NET.