-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add multilevel lookup breaking change #28965
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
52 changes: 52 additions & 0 deletions
52
docs/core/compatibility/deployment/7.0/multilevel-lookup.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,52 @@ | ||
| --- | ||
| title: "Breaking change: Multi-level lookup is disabled" | ||
| description: Learn about the .NET 7 breaking change in deployment where multi-level lookup is disabled. | ||
| ms.date: 04/08/2022 | ||
| --- | ||
| # Multi-level lookup is disabled | ||
|
|
||
| On Windows, framework-dependent .NET applications no longer search for frameworks in multiple install locations. | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| In previous versions, a framework-dependent .NET application searched for frameworks in multiple install locations on Windows. The locations were: | ||
|
|
||
| - When running the application through [dotnet](../../../tools/dotnet.md), subdirectories relative to the `dotnet` executable. | ||
| - When running the application through its executable (`apphost`), the location specified by the value of the `DOTNET_ROOT` environment variable (if set). | ||
| - The globally registered install location in **HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\<arch>\InstallLocation** (if set). | ||
| - The default install location of *%ProgramFiles%\dotnet* (or *%ProgramFiles(x86)%\dotnet* for 32-bit processes on 64-bit Windows). | ||
|
|
||
| This multi-level lookup behavior was enabled by default but could be disabled by setting the environment variable `DOTNET_MULTILEVEL_LOOKUP=0`. | ||
|
|
||
| ## New behavior | ||
|
|
||
| Applications that target .NET 7 or a later version only look for frameworks in one location, which is the first location where a .NET installation is found. When running an application through [dotnet](../../../tools/dotnet.md), frameworks are only searched for in subdirectories relative to the `dotnet` executable. When running an application through its executable (`apphost`), frameworks are only searched for in the first of the following locations where .NET is found: | ||
|
|
||
| - The location specified by the value of the `DOTNET_ROOT` environment variable (if set). | ||
| - The globally registered install location in **HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\<arch>\InstallLocation** (if set). | ||
| - The default install location of *%ProgramFiles%\dotnet* (or *%ProgramFiles(x86)%\dotnet* for 32-bit processes on 64-bit Windows). | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 7 Preview 4 | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This change can affect [binary compatibility](../../categories.md#binary-compatibility). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| There've been numerous issues caused by multi-level lookup: | ||
|
|
||
| - Confusion for users: application can pick a global or default install location despite running .NET from a private install. | ||
| - Inconsistency between platforms (Windows versus non-Windows). | ||
| - Behavior breaks, often in automated systems: a new global .NET install can affect otherwise isolated builds and tests. | ||
| - Performance issues. | ||
|
|
||
| ## Recommended action | ||
|
|
||
| Make sure the required version of .NET is installed at the single .NET install location. The error messages that are emitted on failure to launch include the expected location. | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| None. | ||
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
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.