-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Produce Single File: app crashing #103552
Comments
Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov |
This |
I haven't changed any defaults - where does this get set? It would be amazing if it could run from memory. |
It should simply be default in .NET 6+. The only bundling done is manual, e.g. by setting |
Thanks Andy, but this takes the benefits away from a single file deployment where the app and framework are bundled together in a single file. Made deployment and updates really simple. Back to the drawing board... |
Sorry, I don't understand. The whole framework is linked into that exe -- the only native assets that will appear outside the bundle are things outside the core framework. Do you have native assets aside from the ones in the core framework? Or are you using a UI framework that includes native assets? |
I have a Blazor Server app that runs on kestrel in a Windows service.
Initially everything works perfectly but then after some time I start getting exceptions about certain .NET framework files not being able to load and the app crashes (Blazor red error bar in browser).
I see that by default when using the "Produce Single File" option when publishing, the files are extracted to c:\Windows\Temp\.net\<hash>.
I was under the impression the Temp folder was only cleaned on Windows startup but the internets says files in Temp can be removed in many different cases, such as using Disk Cleanup, running certain updates, on a timer when disk space is low etc.
Either which way, this seems like a terrible oversight for the Temp dir to be used as the extraction point by default.
I've since learned you can set the env var DOTNET_BUNDLE_EXTRACT_BASE_DIR but this is not practical as it would affect all apps published this way. Setting it for this file alone is also not an option as it would require a script to set the env var first.
As a workaround I'm setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Wamp.NET\Environment to DOTNET_BUNDLE_EXTRACT_BASE_DIR=C:\Wamp.NET\.wdn\tmp but this is messy.
The text was updated successfully, but these errors were encountered: