-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Some file is missing from single-file self-contained publish beginning in .NET 5.0.3 #4609
Comments
This sounds like a duplicate of #4397 (which is a duplicate of dotnet/runtime#40103). Please check EventViewer for stack traces and other relevant information for more insights. |
There is nothing in EventViewer. I can't say for sure if this is the same issue, but even if not, it could have a common cause. |
This behavior is new for me beginning in .NET 5.0.3, so that would be different from those other issues, which occurred in earlier versions of NET 5. |
Can you please provide a small repro so we can investigate further? |
I'm still working on a small repro, but I was able to get something from the EventViewer with a different app that also fails to launch: Faulting application name: WasteworksSyncManager.exe, version: 2.0.0.0, time stamp: 0x600b9ea2 Application: WasteworksSyncManager.exe |
Repro steps:
Application: TestWinformsPublish.exe Faulting application name: TestWinformsPublish.exe, version: 1.0.0.0, time stamp: 0x600b9ea2 |
I found that if I commented out this line in program.cs, the app loads ok: |
Duplicate of #4397 |
Problem description:
Application fails to launch with this message: Launch exception: The system cannot find the file specified. (0x80070002)
This only happens with a a single-file self-contained app published to a folder on a PC that doesn't have .NET 5 runtime installed.
If the app is published self-contained but not single-file, the app runs as expected.
This appears to only happen in a winforms app. I have not seen this behavior in WPF apps.
Expected behavior: It should run when published single-file self-contained as it did with previous versions of .NET 5, which did not have this issue,
Minimal repro:
The text was updated successfully, but these errors were encountered: