Change reference paths to application base instead of executingassembly

features/nuget_autobuild
Matija Koželj 2 years ago
parent 3ff30ea1fd
commit 4d5c93f094

@ -84,7 +84,7 @@ public class DependencyLoader
/* /*
* Install packages in standard location. * Install packages in standard location.
*/ */
var packageDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, ".packages"); var packageDirectory = Path.Combine(AppContext.BaseDirectory, ".packages");
var nugetSettings = Settings.LoadDefaultSettings(packageDirectory); var nugetSettings = Settings.LoadDefaultSettings(packageDirectory);

@ -13,7 +13,7 @@ namespace Connected.Host
{ {
cfg.AddCommandLine(args); cfg.AddCommandLine(args);
var appPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var appPath = AppContext.BaseDirectory;
var segments = new Uri(appPath).Segments; var segments = new Uri(appPath).Segments;
segments = segments.Select(e => e.Replace("%20", " ")).ToArray(); segments = segments.Select(e => e.Replace("%20", " ")).ToArray();

Loading…
Cancel
Save