-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Self Contained application failed loads the output directory files #43014
Comments
Tagging subscribers to this area: @vitek-karas, @agocke |
Tagging subscribers to this area: @agocke |
Thanks for trying out single-file. Per the design document https://github.com/dotnet/designs/blob/main/accepted/2020/single-file/design.md in .NET 5 anything except managed code will not be bundled in the application and should be left next to the main Can you please check that after publishing your application as single-file the If so, the right way to get to it from the code is to use Ideally if you want to always ship this file with your application it would be better to embed it as a resource to one of your managed assemblies and load it using the |
Actually I thought this was a single-file publish - but you only mention self-contained. Can you please specify how you published your application? (ideally the command line or VS settings) |
Hi @vitek-karas I have used publish options using above method. |
Thanks - in that case my comment about single-file should apply. |
Hi @vitek-karas which means self contained exe does not support to read/write output directory files? I should use single-file method right? |
I don't know what you mean... Self-contained in .NET Core SDK refers to applications which carry the .NET Core framework with them - they don't require .NET Core preinstalled on the machine to run. This typically makes them large (~70MB or more). Making application self-contained should not in any way affect where/how additional files are packaged with the application. Single-file applications are packaged into much fewer files (ideally just one). Single-file can be combined with self-contained. On Windows due to some limitations typical HelloWorld self-contained single-file application will have one large In .NET 5 single-file application run directly from the
It's hard for me to guess what exactly your application is doing, specifically:
|
Closing for now as there's no enough information. Please feel free to reopen is this is still a problem or you have additional questions. |
WPF Application crash when publish an Self Contained Exe
Description
Application Running on NetCore 5.0
I have published WPF application as Self Contained Exe, and it fails to load an document file(Build Action : Copy Always) so application crash on load document.
Issue:
The text was updated successfully, but these errors were encountered: