scriptcs

How to get scriptCs REPL to load config files


Title says most of it. I want the ScriptCs to read my app.config file in my current directory as it would as if this were an exe. I'm not sure it's possible, but if it is, 'how'?

In particular, I would like my connection strings picked up when I 'new up' an instance of a dbContext.

Thanks, Jason


Solution

  • You can potentially use ExeConfigurationFileMap to defined the app.config you want to use.