Running linqpad scripts 'in process'

Hi, is there a way to run linqpad scripts 'in process'? I have a few queries I would like to schedule to run every 5 mins or so but they make a number of HTTP requests that I would like to cache. Using lprun.exe means the cache is lost when the script terminates. So I was wondering if I can run my own long-running scheduler that can manage the cache of the linqpad queries and re-execute each on a schedule.

Is anything like this possible? If not I'll look at persisting the cache between runs.


  • You can add the .exe as a reference in your project and then use Util.Compile and Util.Run from your own application. I'm not 100% sure this will do what you want but it might get you closer.
  • I should note that when you use Util.Compile with a script that the result is the compiled scrip that you can call .Run on later.
  • Nice one, exactly what I was after. Thanks!
  • Does the Util.Compile take all the references if such were added as default?
    If not, is there a way to configure the script to compile with selected references?
  • Yes, it should compile the query just as if you were running it from LINQPad.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!