Open nickwhaley opened 1 year ago
Tagging subscribers to this area: @agocke, @vitek-karas, @vsadov See info in area-owners.md if you want to be subscribed.
Author: | nickwhaley |
---|---|
Assignees: | - |
Labels: | `area-Single-File` |
Milestone: | - |
We're no longer recommending IncludeAllContentForSelfExtract, so that is the suggested workaround for now.
Description
When a single file, extracted, self contained application is run in the same folder as another self-contained application that uses a different TFM, it will crash during startup.
Reproduction Steps
Expected behavior
Program to run successfully and output 'Hello, World!'.
Actual behavior
Crash with 'Fatal error. Internal CLR error. (0x80131506)'.
Regression?
No response
Known Workarounds
Deleting the
System.Private.CoreLib.dll
file in the current directory corrects the issue but breaks the other application. Disabling IncludeAllContentForSelfExtract also corrects the issue since the file is never extracted.Configuration
Dotnet 7.0.102 Windows 10.0.22000 x64
Other information
I think it may be because it is attempting to load
System.Private.CoreLib.dll
from current directory rather than the extracted contents, even though the file version is wrong. The version ofCoreLib
in current directory is 6.0.1222.56807 and the extracted version in DOTNET_BUNDLE_EXTRACT_BASE_DIR is 7.0.122.56804. TRUSTED_PLATFORM_ASSEMBLIES does contain the full and correct path to the extractedCoreLib
, which you would think would load first, but it does not.Stack trace on the crash:
Windbg output:
strace also confirms the
System.Private.CoreLib.dll
is being read from current directory immediately before crash (same issue on linux).DONET_TRACE does not report anything erroneous, but I can provide the output if needed.