Access to .config files in Roslyn REPL
问题 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. 回答1: This is actually possible now (and may have been at the time this question was asked). Simply create a LoadConfig.csx file with the following: #r "System.Configuration" using System; using System.IO; using System.Linq;