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
PublishSingleFile exe dependant on Temp Directory #3885
Comments
Just to add to this - I've had a customer running a single exe for about 2 months. All of a sudden it has stopped working and saying Looks like an identical problem |
@jeffschwMSFT owns the single file exe feature. Any ideas? |
In .net Core 3, single-file apps are supported by extracting the contents to a temporary directory: %TEMP%.net<appName><id>*. The application host tries to reuse the extracted contents if the above directory exists. If the extracted directory doesn't exist, the host re-extracts the contents, but it doesn't guard against partial cleanup of the directory. In this case, the files within %TEMP%.net<appName><id>\ were deleted by Windows, but the containing directory itself wasn't deleted yet. So, in this intermediate state, the .net host tries to reuse the extraction, but fails. You can circumvent the problem by setting DOTNET_BUNDLE_EXTRACT_BASE_DIR to a non-temporary location where the OS doesn't cleanup the files. |
Issue Title
PublishSingleFile exe dependant on Temp Directory
General
OS: Windows 10 Enterprise - 10.0.18363
.Net Core Version: 3.0.100
I recently had an exe created with the PublishSingleFile stop working on me. it appears that when it was published some dlls were created in the /appdata/local/temp/.net directory and the exe requires those to run properly for some reason. This is an issue as these files can disappear at anytime and permanently break the exe. i would also imagine this makes the exe impossible to port to another machine.
Command Run:
dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true
Exact Project Used:
EchoServer.zip
you can reproduce this issue easily by publishing using the above command, and than going to /appdata/local/temp/.net and deleting the files their.
The text was updated successfully, but these errors were encountered: