9

Is there a way to run a LINQPad script from the command-prompt (no gui)?

If so, LINQPad would be handy for scripting C# and calling it from an automated build.

Greg
  • 211
  • 3
  • 6

3 Answers3

15

lprun from LinqPad has already arrived:

http://www.linqpad.net/lprun.aspx

Fayssal El Mofatiche
  • 1,069
  • 1
  • 8
  • 5
9

Yes, as of LINQPad v4.45.05:

LINQPad.exe "c:\path\to\my\script.linq" -run

To close the LINQPad window, be sure to call this at the end of your script:

Process.GetCurrentProcess().CloseMainWindow();

Brian Chavez
  • 8,048
  • 5
  • 54
  • 47
5

The ability to run LINQPad scripts from the command lines was just added in beta version 4.47

Full documentation on the new lprun.exe utility is available on: http://www.linqpad.net/lprun.aspx

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807