fix: specify the current directory as a startup directory

This commit is contained in:
Polianin Nikita 2024-01-26 19:31:28 +03:00
parent e6cc9437d5
commit 788103c8a5

View File

@ -23,6 +23,8 @@ public class Program
public static void Main(string[] args) public static void Main(string[] args)
{ {
Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddConfiguration(ConfigureEnvironment()); builder.Configuration.AddConfiguration(ConfigureEnvironment());
builder.Configuration.AddJsonFile(Settings.FilePath, optional: true, reloadOnChange: true); builder.Configuration.AddJsonFile(Settings.FilePath, optional: true, reloadOnChange: true);