Home

Error finding appsettings.Production.json when connecting via parameterless constructor

Error finding appsettings.Production.json when connecting via parameterless constructor. Works if I enter appsettings.json, but fails with any other filename.

Note that in the error it states: FileNotFoundExecption The configuration file 'appsettings.json' was not found but the path I entered was appsettings.Production.json

LinqPad Version:v6.11.11 (X64) Licensed
Host runtime version: 3.1.11
Default query runtime version: 5.0.2
Default query reference assembly version: 5.0.0
Roslyn Version: 3.8.0-5.20562.2
FSharp.Compiler.Service version: 22.0.3.0
NuGet client version: 5.6.0.5

Accessing .net core 3.1project

Comments

  • By specifying the path to a configuration file, you're simply telling LINQPad to copy that file into the output folder so that it can be found by your context.

    Do you have any code in your context like this?

    var builder = new ConfigurationBuilder ().AddJsonFile ("...")
    

    If so, can you post that code?

Sign In or Register to comment.