Closed heartacker closed 4 years ago
Some of the functionality of using relative paths breaks down 😖
In the current version, we simply extract the contents of the bundle to a directory on the disk, and declare that directory as the base-directory. This choice aims to preserve compatibility for apps that assume that apcontext.basedirectory contains the app.dll. In the current version, we'll need to use Process.GetCurrentProcess().MainModule.FileName or native APIs such as GetModuleFileName to get the path of the native AppHost.
In subsequent versions, once the app.dll is processed directly from the bundle, the design doc discusses options to set AppContext.BaseDirectory. The current proposal is to set it to the location of the AppHost.
This is a dup of https://github.com/dotnet/core-setup/issues/7491
Issue Title
my wpf application has multi dlls. and when i publish my wpf app as one WinExe singlefile, the code
return the temp directory,
c:\Users\xxx\AppData\Local\Temp\.net\xxxx.xxxx.dll
not the app directory It's confusing