Closed
Description
The fundamental architectural difference here is that some platforms provide support for multiple architectures, e.g. they run ARM natively, but provide an emulator for amd64.
There are a couple areas we need provide support for:
- Installations of shared frameworks with multiple architectures
- Deployment of standalone apps with multiple architectures
There are two OSes we want to focus on: Windows and Mac OS.
We now have proposed designs for the shared framework/global install of .NET:
- Add plan for x64 emulation designs#217
- https://github.com/dotnet/designs/blob/main/accepted/2021/install-location-per-architecture.md
Work items:
- Agree on the path format for the architecture-specific default install locations.
- Embed the default install location for each different architecture into the apphost.
- Add a mechanism into the apphost to retrieve the OS architecture in which the process is running.
- Extend the global install location config file (macOS and Linux)
- Add support for downlevel apphost compat: installers should keep the first line of the config file as is, while adding architecture-specific lines.
- Add logic for picking up the correct installation (search for the arch-prefixed line matching the current architecture and fallback to the non-prefixed line if none was found).
- Modify apphost to pick the correct arch-specific
DOTNET_ROOT_ARCHenv variable first and fallback to the defaultDOTNET_ROOTif it wasn't found. - Add multi-arch support for self-registered installations using Windows Registry.
- Include all architectures in commands line
dotnet --info- Host should inform user about other installed archs on the system #51101 - Include all architectures in errors about missing runtime/framework - Host should inform user about different archs when failing to find framework #51102
- Extend test infra to easily mock the OS and architecture so that testing can be done anywhere.
Activity
vitek-karas commentedon Apr 12, 2021
dotnet --infobehavior improvement: #51101Note that this is an existing problem for Windows x86/x64, Apple M1 and future Windows arm64 are just more examples of the same.
vitek-karas commentedon Apr 12, 2021
dotnet app.dllbehavior improvement: #51102Just like above, this is an existing problem on Windows x86/x64.
mateoatr commentedon May 20, 2021
Some work items based on the approved design:
DOTNET_ROOT_ARCHenv variable first and fallback to the defaultDOTNET_ROOTif it wasn't found.agocke commentedon May 20, 2021
LGTM -- @mateoatr feel free to add this information to the issue directly and change it how you like.
vitek-karas commentedon May 21, 2021
Looks good - couple of test ideas:
agocke commentedon Jul 13, 2022
Closing as complete. We can track individual items separately if we still feel they're useful.