Skip to content

Allow running tool on latest&greatest#95

Merged
neuecc merged 1 commit into
Cysharp:masterfrom
kzu:rollforward
Jul 25, 2025
Merged

Allow running tool on latest&greatest#95
neuecc merged 1 commit into
Cysharp:masterfrom
kzu:rollforward

Conversation

@kzu
Copy link
Copy Markdown
Contributor

@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.
@kzu
Copy link
Copy Markdown
Contributor Author

kzu commented Jul 18, 2025

Gentle nudge @neuecc @mayuki @guitarrapc

.NET 7 has long been deprecated by now.

@neuecc
Copy link
Copy Markdown
Member

neuecc commented Jul 25, 2025

Thank you.
Yes, I've always been troubled by tool version issues, I think it's the right choice!

@neuecc neuecc merged commit 06b6faf into Cysharp:master Jul 25, 2025
@kzu kzu deleted the rollforward branch July 26, 2025 21:03
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.

2 participants