Skip to content

Commit

Permalink
Ensure loading of AppSettings for defaults. (#2325)
Browse files Browse the repository at this point in the history
Change the base directory from the default if the running location to
the app install directory.
  • Loading branch information
MrHinsh authored Sep 4, 2024
2 parents cc0b804 + 105f98b commit 5bd0d5b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/Reference/Generated/MigrationTools.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/MigrationTools.Host/MigrationToolHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public static IHostBuilder CreateDefaultBuilder(string[] args, Action<IConfigura
})
.ConfigureAppConfiguration(builder =>
{
builder.SetBasePath(AppContext.BaseDirectory);
//builder.AddJsonFile("appsettings.json", optional: false);
if (!string.IsNullOrEmpty(configFile) && File.Exists(configFile))
{
builder.AddJsonFile(configFile);
Expand Down

0 comments on commit 5bd0d5b

Please sign in to comment.