Skip to content

Allow running tool on latest&greatest #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kzu
Copy link

@kzu kzu commented May 19, 2025

It's highly unlikely that a future vesion of the dotnet runtime will break things so fundamentally that the Ulid CLI would fail. Therefore, rather than failing to start as time goes by and new versions of dotnet become prevalent and the current ones targeted by the project become obsolete, let the tool run on whatever version the user has (latest major even).

This setting (for example) would have allowed the existing published build targeting the STS .net7 to run on .net8 or even .net9/10 soon, without any issues.

As it is now, however, users get an error instead:

pwsh> dotnet ulid
You must install or update .NET to run this application.

App: C:\Users\[user]\.dotnet\tools\dotnet-ulid.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.36 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  8.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  9.0.5 at [C:\Program Files\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=7.0.0&arch=x64&rid=win-x64&os=win10

Which is quite a bad user experience.

It's highly unlikely that a future vesion of the dotnet runtime will break things so fundamentally that the Ulid CLI would fail. Therefore, rather than failing to start as time goes by and new versions of dotnet become prevalent and the current ones targeted by the project become obsolete, let the tool run on whatever version the user has (latest major even).

This setting (for example) would have allowed the existing published build targeting the STS .net7 to run on .net8 or even .net9/10 soon, without any issues.

As it is now, however, users get an error instead:

```
pwsh> dotnet ulid
You must install or update .NET to run this application.

App: C:\Users\[user]\.dotnet\tools\dotnet-ulid.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.36 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  8.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  9.0.5 at [C:\Program Files\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=7.0.0&arch=x64&rid=win-x64&os=win10
```

Which is quite a bad user experience.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant