Core: .netcore 3.0 single publish temp folder location

Created on 4 Sep 2019  路  6Comments  路  Source: dotnet/core

Single publish temp folder location

When doing a single publish a temp folder is supposedly used. This is probably similar to warp. I'd like to know where the temp folder is on the different os's.

Most helpful comment

It looks like this is described in the design over here: https://github.com/dotnet/designs/blob/107b50feec105b7c2b67b37acb322054e2255df5/accepted/2020/single-file/extract.md#extraction-location (link pinned to commit)

The code lives here: https://github.com/dotnet/core-setup/blob/aae3e31d0011b09c8277d2f06f00b07e1fba8cb5/src/corehost/cli/apphost/bundle/bundle_runner.cpp#L169-L193

I've heard this called "single-file publish", not just "single publish", which may have caused some confusion. (Pretty clear from the link though!)

All 6 comments

published applications are generally located in the project folder under:

~binReleasenetcoreapp.publish

I always just delete the contents of the publish folder before publishing again...

This is already super clear, but when you do a dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true all the dlls are bundled together into a single exe and when run they are unzipped or unbundled into a temp folder as said in https://dotnetcoretutorials.com/2019/06/20/publishing-a-single-exe-file-in-net-core-3-0/

When this is executed, the dependencies are extracted to a temporary directory and then everything is ran from there.

It looks like this is described in the design over here: https://github.com/dotnet/designs/blob/107b50feec105b7c2b67b37acb322054e2255df5/accepted/2020/single-file/extract.md#extraction-location (link pinned to commit)

The code lives here: https://github.com/dotnet/core-setup/blob/aae3e31d0011b09c8277d2f06f00b07e1fba8cb5/src/corehost/cli/apphost/bundle/bundle_runner.cpp#L169-L193

I've heard this called "single-file publish", not just "single publish", which may have caused some confusion. (Pretty clear from the link though!)

design files are 404 links :(

They moved the files around in that repo. Is https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/extract.md what you are looking for?

Updated my link and pinned it for the future. Thanks, surprised that rearrangement happened without placeholders given how many links you'd expect to that repo (where pinning makes it harder to later revise the docs, so I haven't always done it)....

Was this page helpful?
0 / 5 - 0 ratings