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.
The issue to which I refer as the CodeBase Issue, has to do with multiple places within the Wix 4 product that, for one reason or another, attempt to determine the file from which the currently executing code was loaded. One of the situations in which this might occur includes a vast number of system-level tests with names that begin with "CanBuild". This can happens when the test needs to find wixnative.exe or WixToolset.Sdk.props. Here, we are generally looking at a system that has built the Wix 4 product, but there might be scenarios in which these tests might be run during or after the installation of Wix 4 on a machine that is, for our purposes, only used to create installation packages and never used to build Wix 4, itself. Such tests might be run from the command line or from Visual Studio.
Beyond these tests, there might be other scenarios in which the Wix 4 product wants to know from where it was loaded. There are a couple of problems with trying to determine how a particular piece of code got loaded into the current process. The current code relies on either on a .NET Framework 4.72 API or a .NET Core 3.1 API, neither of which is available in .NET Core 5.0 or later. In .NET Core 5.0 and later, you can't dpend on much that is operating-system dependent.
We need a classification of all the scenarios in which this situation arises that recognizes the actual problem that is currently being solved (or perhaps just being attacked) by using knowledge of the image source. Then we need a way to provide the necessary knowledge where it is needed.
When tests are run from disposable file systems, the actual path to the loaded image is typically in the temp directory of the user account running the test. This is very different from a non-test situation.
I'm sure that I don't grasp all of the issues involved, but I have been looking at this issue (among others) for at least nine months. I think that it is time for some guidance from and decision making by those holding the keys to the realm.