I've downloaded the LinqPad 6 app. I noticed that it doesn't have the App.config tab as on LinqPad 5. How do I reference my app.config xml settings in LinqPad 6?
.NET Core has moved away from app.config to appsettings.json.
To reference an appsettings.json file, press F4 and add a reference to it. (This works because any non-assembly files that you reference are automatically copied to the application base directory before the query executes.)
Can I create a custom appsettings.json file for each program and reference it? Like [appname].appsettings.json.
Also, how would I reference the appsettings.json or [appname].appsettings.json file if I'm using Log4Net? Here's my code:
static readonly ILog Log = log4net.LogManager.GetLogger("LogFileAppender");
The appsettings.json file is not usually prefixed with the application name. So you just need to reference a file called appsettings.json.