Skip to content

Conversation

@nagilson
Copy link
Member

@nagilson nagilson commented Apr 11, 2025

Which and where can be slow to find. For the common case which we want to make fast, we can just check 'dotnet' first and see if that works.

Note: Ideally, this function would only return a string, but that would require writing a wrapper around this return type just for this function and does not follow the other existing patterns.

With respect to tests: This should be covered by the existing 'find path' tests.

cc @lifengl

Which and where can be slow to find. For the common case which we want to make fast, we can just check 'dotnet' first and see if that works.

Note: Ideally, this function would only return a string, but that would require writing a wrapper around this return type just for this function and does not follow the other existing patterns.

With respect to tests: This should be covered by the existing 'find path' tests.
Copilot AI review requested due to automatic review settings April 11, 2025 22:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@nagilson nagilson requested review from a team and adrianvmsft April 11, 2025 23:35
{
const oldLookup = process.env.DOTNET_MULTILEVEL_LOOKUP;
try {
process.env.DOTNET_MULTILEVEL_LOOKUP = '0'; // make it so --list-runtimes only finds the runtimes on that path: https://learn.microsoft.com/en-us/dotnet/core/compatibility/deployment/7.0/multilevel-lookup#reason-for-change
Copy link
Member Author

@nagilson nagilson Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not enabling this will prevent discovery of dotnet subdirectories:

When running the application through [dotnet](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet), subdirectories relative to the dotnet executable.

https://learn.microsoft.com/en-us/dotnet/core/compatibility/deployment/7.0/multilevel-lookup

@nagilson
Copy link
Member Author

/azp run

@nagilson nagilson enabled auto-merge (squash) April 14, 2025 17:29
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nagilson nagilson merged commit f5411d3 into dotnet:main Apr 14, 2025
8 checks passed
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