dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.06k stars 4.69k forks source link

Customize bundle extract base directory within the app #104422

Closed rara64 closed 2 months ago

rara64 commented 3 months ago

I'm using IncludeNativeLibrariesForSelfExtract option in my single file self-contained app and by default these libraries will be extracted to AppData\Local\Temp\.net. I want to change this location to be in the same directory where the app executable is located. I understand there is an environment variable DOTNET_BUNDLE_EXTRACT_BASE_DIR, but this would require my app to have an external runner.

Is there a way to define this inside runtimeconfig.template.json or in a similar place so that the published app will auto-extract native libraries to the specified folder on every machine?

If something like this doesn't currently exist, I'd like to request this as a new feature.

dotnet-policy-service[bot] commented 3 months ago

Tagging subscribers to this area: @agocke, @vitek-karas, @vsadov See info in area-owners.md if you want to be subscribed.

agocke commented 2 months ago

If something like this doesn't currently exist, I'd like to request this as a new feature.

Nothing like this exists right now. Extraction is already considered a secondary feature. I don't think it's likely that we will offer any more customization options in the future, so I'm going to close this as not planned.