Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access to .config files in Roslyn REPL

Tags:

c#

roslyn

Using the Roslyn June 2012 CTP:

Is there a way to provide the Roslyn C# Interactive/REPL with a .config file for the code being explored? A simple example scenario is code which depends on a connection string which it would usually obtain from the app.config/web.config.

like image 559
Stuart Avatar asked Jun 06 '12 00:06

Stuart


1 Answers

There isn't a way to do this right now, though it is something that we're thinking about for the future.

In the meantime, could you factor your code to take the connection string as a parameter, and just pass it into the method in the Interactive Window?

like image 186
Kevin Pilch Avatar answered Oct 09 '22 03:10

Kevin Pilch