-
Notifications
You must be signed in to change notification settings - Fork 1.2k
dotnetup walkthrough - ux & graphical improvements
#53464
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
Draft
nagilson
wants to merge
52
commits into
dotnet:release/dnup
Choose a base branch
from
nagilson:nagilson-dnup-walkthrough-ux
base: release/dnup
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,148
−996
Draft
Changes from 49 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
22d34da
`dotnetup dotnet` experiment design doc
nagilson 78ab6a5
grammar fix
nagilson ba923d1
grammar
nagilson 63dbc24
capitalize windows
nagilson c3e5aae
Merge branch 'release/dnup' into nagilson-dotnetup-dotnet-design
nagilson cace20d
fix dotnetup dotnet doc
nagilson 67bc643
Basic implementation
nagilson 43ee7c0
Merge remote-tracking branch 'upstream/release/dnup' into nagilson-do…
nagilson b22e7d0
interactivity test
nagilson 68cc5af
Walkthrough Improvements, WIP
nagilson 97265bd
copilot instructions for multiple agents running tests
nagilson 330e07a
Revert "copilot instructions for multiple agents running tests"
nagilson 6f2fdf0
Copilot instructions for dotnet up running multiple agents
nagilson 86532d7
codework space launches properly
nagilson 5090726
Dim first run notice text.
nagilson d0fceb7
Add Meziantou Analyzer
nagilson 6f0aba9
More improvements to walkthrough
nagilson 1c2a6a2
split up too long functions into sub components
nagilson a7cb3c1
reduce duplicated code for admin prompt
nagilson 91b7591
Improve option selector and dimming / progress has 'shimmer'
nagilson 21a13e9
improve formatting.
nagilson 050aa43
walkthrough untracked and improve shimmer speed
nagilson 506425e
Add aliases for runtime component specs for easier typing
nagilson 794bcb6
Concurrent SDK install, actually install admin installs into local
nagilson 27ab458
enforce utf8 encoding for pretty text bar
nagilson 01e65f7
Various fixes for color display and whitespaces
nagilson 849b684
try to display summary line at the end
nagilson 0208485
leverage concurrent install in the toolset
nagilson 6991aff
concurrent cache load
nagilson 80e6042
add throttle limit so we don't download an insane amount of stuff if …
nagilson 40e0615
separate global json so paths path isnt the default install location …
nagilson fa37b29
extrct + download concurrently
nagilson 277226c
improved throttling - dont spawn 20 threads lol
nagilson 9908c3c
validate manifest contents
nagilson e8ecb61
padding and lower concurrency as the cdn throttles
nagilson 7491bd3
lower concurrency as cdn throttles
nagilson 2380d63
padding (again)
nagilson 007f33d
Allow selection of installs to migrate
nagilson 3008045
Disable ansi support for console rendering in banner tests
nagilson 2da36bd
Don't print warnings for intermediate directories on unix - add verbo…
nagilson 4a00ef8
Comment to improve clarity on the code
nagilson 727edd5
Alignment test improvements
nagilson b47281a
Removed the dotnet bot art - for now it looks tacky
nagilson 623b1ed
Dont select because select all / deselect all is not supported
nagilson 6b96466
improve instruction prompt on conversions
nagilson e6a7617
Properly defer install copies, use past tense verbs on completion
nagilson 225123b
don't copy installed output code
nagilson a3805c0
improved error message outputs
nagilson fb3721d
Explanation of channels walkthrough + code feedback
nagilson fca8693
PR Feedback, Round 1
nagilson 1fdf2a4
more nuanced path management + copilot instructions for pr feedback …
nagilson 87eff2a
Merge remote-tracking branch 'upstream/release/dnup' into nagilson-dn…
nagilson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # `dotnetup dotnet` | ||
|
|
||
| # Motivation | ||
|
|
||
| Manipulating the `PATH` environment variable can be tricky when Visual Studio and other installers are involved. These applications are automatically run with updates. They override the system level path on a regular basis which blocks `dotnetup` installs from being used. | ||
|
|
||
| To provide an experience during the prototype of `dotnetup` before any official product is changed to work well with `dotnetup`, we propose 'aliasing' or 'shadowing' dotnet commands via `dotnetup` as one option. | ||
|
|
||
| One downside to this is that IDE components whose processes call `dotnet` would still be broken by a change to the `PATH`. However, this prevents user interactions with terminals and scripts from being broken. | ||
|
|
||
| Another downside is that this requires scripts to be updated to call `dotnetup dotnet` instead of `dotnet`. For many individuals, this is a no-go. | ||
| This also adds the overhead of an additional process call. | ||
|
|
||
| Yet, until the `dotnet` muxer itself or .NET Installer can be modified, this provides a consistent way for the user to enforce their intended install of `dotnet` when running commands. | ||
|
|
||
| This also enables the `PATH` to have the admin install and for the two install types to co-exist - such that | ||
| `dotnetup` based installs can still be used by the local user. That makes `dotnetup` useful even when IT Admins prevent the user from overriding the system path, such that it can be used in tandem with admin installs. This also gives `dotnetup` full control over the process call, such that environment variables like `DOTNET_ROOT` can be set. | ||
|
|
||
| # Commands | ||
|
|
||
| `dotnetup dotnet <>` | ||
| `dotnetup do <>` (alias for the same thing) | ||
|
|
||
| Arguments in `<>` are forwarded transparently to `dotnet.exe` in the determined location which limits our ability to configure the command itself. | ||
| The `dotnet.exe` hive used will follow the logic `dotnetup` uses for installation location. (e.g. `global.json` vs `dotnetup hive` priority.) | ||
|
|
||
| # Technical Details | ||
|
|
||
| ### Permissions | ||
|
|
||
| The subprocess inherits the current elevation level. We considered de-elevating when `dotnetup` runs under elevation, but decided against it: it's confusing for an admin prompt to de-elevate, and workload commands often require elevation. There is also more risk trying obscure methods to de-elevate. The subprocess will run with whatever privileges `dotnetup` currently has. | ||
|
|
||
| ### Return values | ||
|
|
||
| We should return with the return value of `dotnet` and mimic that behavior. | ||
|
|
||
| ### Interactive Mode | ||
|
|
||
| The command uses `shell=true` (UseShellExecute=false with shell dispatch) so that interactive commands (e.g. `dotnetup dotnet interactive`) work correctly with stdin/stdout/stderr streaming. This also supports shell redirection techniques such as `<<` and piping. | ||
|
|
||
| ### Environment Settings | ||
|
|
||
| The spawned process should modify the `PATH` and set `DOTNET_ROOT` to the value of the determined `dotnet.exe` location, so that `runtime` based interactions (debug, test, run) can work as expected. This would override any custom `DOTNET_ROOT` to ensure the hive is used, for scenarios like when an admin install is side by side with `dotnetup` installs. It should also preserve the `cwd` of the shell and the other environment variables contained within. Since we use `shell=true`, environment variables are expanded by the shell and we don't need to call `ExpandEnvironmentVariables` manually. | ||
|
|
||
| When cross-architecture support is added, we should consider setting variables such as `DOTNET_ROOT_x64`. | ||
|
|
||
| ### Future: Native AOT In-Process Invocation | ||
|
|
||
| If `dotnetup` is published as native AOT, we could potentially invoke the dotnet hive's `hostfxr` directly in-process instead of spawning a subprocess. This would eliminate the process overhead entirely. This is a future work item — for now, we use the subprocess approach. |
6 changes: 6 additions & 0 deletions
6
documentation/general/dotnetup/designs/dotnetup-multi-architecture.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ### Cross Architecture Considerations | ||
|
|
||
| One scenario our admin installers support is installing the x64 .NET SDK on an ARM64 device. | ||
| We should consider how to handle these hives in `dotnetup`. | ||
|
|
||
| When making this implementation, please also consider whether we should set `DOTNET_ROOT_x64` with `dotnetup dotnet <>` as defined by [`the dotnetup dotnet command design`](./dotnetup-dotnet.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project> | ||
| <!-- Pin RepoRoot to the real repo root so Arcade does not infer it from this directory's global.json. --> | ||
| <PropertyGroup> | ||
| <RepoRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', '..', '..'))</RepoRoot> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..'))" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.