-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Dotnet apps fail to start when run in a directory containing a backslash #75387
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsDescriptionIf a dotnet self-contained app starts up from a path where a component contains a backslash (e.g. Reproduction Stepsmkdir test_console_app
cd test_console_app
dotnet new console
dotnet publish --self-contained -p:PublishSingleFile=true test_console_app.csproj --runtime linux-x64 --self-contained true --configuration Release --framework net6.0
mkdir s\\test
cp bin/Release/net6.0/linux-x64/publish/test_console_app s\\test/
s\\test/test_console_app Expected behaviorThe app should run. Failing that, an error message that provides relevant information should be displayed. Actual behaviorThe app crashes with the message
Regression?Unknown. Known WorkaroundsRun from only paths without backslashes in folder names. Configuration
Other informationIf you run the app with
|
I have debugged it too. With my change #75097, which besides adding logging for E_FAIL also stopped reporting all failures in the EE initialization that resulted in an exception as
|
If I patched the string at the
Edit: I have forgotten to mention that I was debugging the non-single file version as it behaved the same as the single file and it is simpler to debug. |
My mistake, I have forgotten to copy over the jit I've built. So there were no further issues:
|
Now as for the |
We should make the breaking change. 99+% of the cases that take paths go through libraries shims that do not have this adjustment. It is just the few remaining cases that still go through the Win32 PAL have this odd behavior. |
There seems to be a similar problem with forward slash in the path (although I have no idea how that is supposed to work if forward slash is also a directory separator). From: #75882 DescriptionIf a path to a dotnet application contains slashes Reproduction Steps
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
Fixed by #78995. The original repro steps (with backward slashes) work as expected. |
Description
If a dotnet self-contained app starts up from a path where a component contains a backslash (e.g.
/home/cooluser/fancy\folder/app_binary
, where one of the folders in the path is namedfancy\folder
, with a backslash in the folder name), the runtime startup will fail, and the cryptic error messageFailed to create CoreCLR, HRESULT: 0x80004005
will be displayed.Reproduction Steps
Expected behavior
The app should run. Failing that, an error message that provides relevant information should be displayed.
Actual behavior
The app crashes with the message
Regression?
Unknown.
Known Workarounds
Run from only paths without backslashes in folder names.
Configuration
Other information
If you run the app with
COREHOST_TRACE=3
, you still don't get anything terribly useful; it continues exactly as per normal until it printsFailed to create CoreCLR, HRESULT: 0x80004005
to the log and immediately exits.The text was updated successfully, but these errors were encountered: