Skip to content

Commit

Permalink
examples: improve support for case sensitive filesystem (#36)
Browse files Browse the repository at this point in the history
When running on Windows or other case sensitive filesystems, the config
file might be `appsettings.Development.json` or
`appsettings.development.json`, leading to config errors if the exact
name is not used.
This PR allows to use both in the examples, so it's easier to run them.
  • Loading branch information
dluc authored Sep 5, 2024
1 parent a176a4a commit 242f761
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/dotnet-01-echo-bot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ internal static async Task Main(string[] args)
appBuilder.Configuration
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json", optional: true)
.AddJsonFile("appsettings.development.json", optional: true)
.AddEnvironmentVariables();

// Storage layer to persist agents configuration and conversations
Expand Down
1 change: 1 addition & 0 deletions examples/dotnet-02-message-types-demo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ internal static async Task Main(string[] args)
appBuilder.Configuration
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json", optional: true)
.AddJsonFile("appsettings.development.json", optional: true)
.AddEnvironmentVariables();

// Storage layer to persist agents configuration and conversations
Expand Down
1 change: 1 addition & 0 deletions examples/dotnet-03-simple-chatbot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ internal static async Task Main(string[] args)
appBuilder.Configuration
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json", optional: true)
.AddJsonFile("appsettings.development.json", optional: true)
.AddEnvironmentVariables();

appBuilder.Services
Expand Down

0 comments on commit 242f761

Please sign in to comment.