Provide a way for .linq scripts to indicate that they require a fresh app domain
Today when running scripts you can use CTRL+SHIFT+F5 or GUI advanced settings to determine whether you get a new app domain.
The thing is, most of the time I want a new app domain... except when I don't (typically because my script is dynamically loading up a bunch of assemblies that could change out from under me or when I am trying to measure/debug/redo some static initialization).
It would be nice if a script could express it's need for a fresh domain via the XML at the top of the raw script file. That way LinqPad would know how to invoke the script correctly.

This feature is already available. Add the following to your script: Util.NewProcess = true;
-
QueryCompilation has a ReuseAppDomain property, so if you're using Util.Run, set that flag to false after calling Util.Compile.
-
Mike A commented
Thanks for the fast response! Does this work for scripts called via Util.Compile(...).Run(...)? I ask because I'm trying to use this and it seems like my script is still holding onto file locks on assemblies it loads despite setting NewProcess to true. Which takes precedence: QueryCompilation.NewProcess or what the script sets in Util.NewProcess?