Skip to content
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

Install natively using dotnet-install scripts #2

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Conversation

Phault
Copy link
Owner

@Phault Phault commented Feb 13, 2024

Having an installation for each .NET SDK version causes all sorts of issues, as the whole ecosystem expects all SDKs and runtimes to share the same installation directory.

In practice this is currently causing issues because DOTNET_ROOT cannot be set to anything meaningful on a system-level. Other tooling like IntelliJ Rider can thus not find the correct SDK to use. You'd have to somehow set DOTNET_ROOT per project, and even then that project can only be aware of a single SDK version at a time.

So I've decided to rely on proto's native_install feature instead, which opens another can of worms, but a more manageable one at least. It relies on the official dotnet-install scripts to install SDKs into whatever DOTNET_ROOT is set to (or ~/.dotnet per default). Supporting uninstallation will come later, as it will be a bit tricky, now that everything lives in the same directory.

The dotnet executable will no longer be shimmed nor symlinked, and the user is expected to add DOTNET_ROOT to their PATH.

Having an installation for each .NET SDK version causes all sorts of
issues, as the whole ecosystem expects all SDKs and runtimes to share
the same installation directory.

In practice this is currently causing issues because DOTNET_ROOT cannot
be set to anything meaningful on a system-level. Other tooling like
IntelliJ Rider can thus not find the correct SDK to use. You'd have to
somehow set DOTNET_ROOT per project, and even then that project can only
be aware of a single SDK version at a time.

So I've decided to rely on proto's `native_install` feature instead,
which opens another can of worms, but a more manageable one at least.
It relies on the official dotnet-install scripts to install SDKs into
whatever DOTNET_ROOT is set to (or ~/.dotnet per default).
Supporting uninstallation will come later, as it will be a bit tricky,
now that everything lives in the same directory.

The dotnet executable will no longer be shimmed nor symlinked, and the
user is expected to add DOTNET_ROOT to their PATH.
@Phault Phault merged commit 9986b03 into main Feb 14, 2024
16 of 17 checks passed
@Phault Phault deleted the native-install branch February 14, 2024 18:19
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