LINQPad 6 does a full compilation when running a selection

In LP6, the following script does not run (selecting line 6-9 from this file).


I have developed the query in LP5 which works fine on an uninitialized database:

So, any chance to limit the script to the selected fraction before delivering it to the compiler?


  • LINQPad 6 allows the selection to call methods in the rest of the script, which is why the whole thing needs to compile. You can think of LINQPad 6 as commenting out the unselected lines in the Main method, and then executing the entire script. The workaround, when the rest of script won't compile, is to press Shift+Ctrl+C to clone the selection into a new query.

    LINQPad 5 does something simpler and just executes the selection in isolation. This doesn't require the rest of the script to compile, but means that you can't call methods or use types defined in the rest of the script. When you want to do the latter, the workaround is messy: instead of executing a selection, you have to comment out the code you don't want to run.

Sign In or Register to comment.