XamlStyler
XamlStyler copied to clipboard
can not run in linux while dotnet-sdk 7/8 installed
Describe the bug
> xstyler
You must install or update .NET to run this application.
App: /home/acker/.dotnet/tools/xstyler
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: /home/acker/.dotnet
The following frameworks were found:
8.0.0 at [/home/acker/.dotnet/shared/Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=linux-x64&os=ubuntu.22.04
To Reproduce Steps to reproduce the behavior:
- wsl
- install dotnet-sdk-8.0
- install xamlstyler.Console
- run xstyler
- fail
Expected behavior if we install dotnet-script cli tool , we can run dotnet-script within dotnet sdk 6/7/8
Screenshots
External Configuration
Version Info (please complete the following information):
- OS: [e.g. Windows 10 (1903), MacOS (10.15) , Ubuntu (19.10), etc.]
- Visual Studio: [e.g., VS2019 (16.4.1), VS for Mac (8.3.11), etc.]
- XAML Styler:
Package Id Version Commands
csharpier 0.25.0 dotnet-csharpier
dotnet-script 1.5.0 dotnet-script
xamlstyler.console 3.2206.4 xstyler
Additional context Add any other context about the problem here.
Looks like it would be resolved if this https://github.com/Xavalon/XamlStyler/pull/419 is merged, but that PR looks abandoned. (I'd also like support for > 6)
As I commented on #419, a better way to fix this would be via a RollForward=Major policy:
https://learn.microsoft.com/en-us/dotnet/core/versions/selection#control-roll-forward-behavior
Indeed, users should already be able fix this themselves my adding it to a .runtimeconfig.json file adjacent to the xstyler exe, which should allow it to run on newer framework versions when 6.0 isn't installed.