-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-AssemblyLoader-coreclrin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Description
Description
When using self-contained binaries, we've run into a strange error message if the binary is executed on a path outside of /usr/local/bin
. This was reported to us under Azure/bicep#15278.
Here's the error:
./bicep build test.bicep
Failed to load System.Private.CoreLib.dll (error code 0x80070002)
Path: /System.Private.CoreLib.dll
Error message: Could not load file or assembly '/System.Private.CoreLib.dll'. The system cannot find the file specified.
(0x80070002)
Reproduction Steps
- Clone https://github.com/Azure/bicep
- Run
dotnet publish --configuration release --self-contained true -r linux-arm64 ./src/Bicep.Cli/Bicep.Cli.csproj
- Copy the binary to a linux arm64 container, and try to run it from a path outside of
/usr/local/bin
- e.g../bicep build <foo>
Expected behavior
The binary runs successfully and returns exit code 0.
Actual behavior
The following error is returned:
./bicep build test.bicep
Failed to load System.Private.CoreLib.dll (error code 0x80070002)
Path: /System.Private.CoreLib.dll
Error message: Could not load file or assembly '/System.Private.CoreLib.dll'. The system cannot find the file specified.
(0x80070002)
Regression?
Unknown
Known Workarounds
Copy the binary to /usr/local/bin
on the system.
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
area-AssemblyLoader-coreclrin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Type
Projects
Status
No status