From 9d2209316565d6dc2e5ca6d899e2f94d9b2d806e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Ko=C5=BEelj?= Date: Wed, 4 Jan 2023 16:15:16 +0100 Subject: [PATCH] Add support for tool paths --- src/Connected.Host/DependencyLoader.cs | 2 +- src/Connected.Host/Program.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Connected.Host/DependencyLoader.cs b/src/Connected.Host/DependencyLoader.cs index 38def3b..793fe77 100644 --- a/src/Connected.Host/DependencyLoader.cs +++ b/src/Connected.Host/DependencyLoader.cs @@ -84,7 +84,7 @@ public class DependencyLoader /* * Install packages in standard location. */ - var packageDirectory = Path.Combine(AppContext.BaseDirectory, ".packages"); + var packageDirectory = Path.GetFullPath(".packages"); var nugetSettings = Settings.LoadDefaultSettings(packageDirectory); diff --git a/src/Connected.Host/Program.cs b/src/Connected.Host/Program.cs index 149fea1..6b0df31 100644 --- a/src/Connected.Host/Program.cs +++ b/src/Connected.Host/Program.cs @@ -30,6 +30,9 @@ namespace Connected.Host } } + if(File.Exists(Path.GetFullPath("./sys.json"))) + cfg.AddJsonFile("./sys.json", true, false); + cfg.AddEnvironmentVariables(); }) .ConfigureServices((context, services) =>