I suggest you ...

329 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Anonymous shared this idea  ·   ·  Admin →

    11 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Michel BretschneiderMichel Bretschneider commented  · 

        Why not use Util.Run from your code, or LPRun from ccommand line? This post is quite old and since there weren't any recent updates and we now have lprun it could be closed. Correct me if I'm wrong.

      • Alan HemmingsAlan Hemmings commented  · 

        Hi Joe, just read your notes on oreilly, where you ask about output: I'd love for the QueryResult to support something like automapper and automatically MAP the results from the script to my <T> results, for example, perhaps with a:

        public class Top { public double TopX { get; set; } public double TopY { get; set; }}
        List<Top> stats = Query.Run("myquery.linq");
        or
        var stats = Query.Run<List<Top>>("myquery.linq");

        Having the standard error and console still be supported, would allow me to continue to use the approval's library we use for our build steps ( http://approvaltests.sourceforge.net/ ) to (approve) that the build step ran correctly, and then pipe the strongly typed output of that step to the next build step without having to "parse" text or html.

      • Alan HemmingsAlan Hemmings commented  · 

        re: MikeS -> Oh my gosh, "compile to exe and install as service"
        that is such an awesome idea! (I second that idea)
        (I spent some time yesterday having coffee with a dev friend, he was showing me Scala samples, I was showing him writing the same Scala code in C# with same terseness, from within LinqPad. sweetness ;-D Thanks Joe! My top 3 dev tools, Linqpad, Visual studio, Resharper... in that order. I love the fact that if I'm really pressed for time, have a clean server with no toolage, I can install Linqpad within seconds, and get on with being productive.

      • mcintyre321mcintyre321 commented  · 

        Has there been any progress on this?

      • MikeSMikeS commented  · 

        Voting for: Run script from command line, Compile to exe/dll from command line.

        Now with the async stuff coming in I can picture LP being a kind of a node.js IDE except in C#.NET and I envision a toolbar button that says "compile to exe and install as service".

      • Lasse Vågsæther KarlsenLasse Vågsæther Karlsen commented  · 

        I would also love to have this, but I would like to have it separate the act of compiling the script from the act of running it. I use LINQPad scripts in my open source class libraries and I would love to have my continous integration server verify that all of the examples still compile. Basically, I would like a command line option that says "compile-only", it wouldn't need to save the assembly, just compile it to verify that all the code is legal.

      • Adam RalphAdam Ralph commented  · 

        +3 yes please! this would allow us to use C# as a general scripting language in many scenarios

      • awagawag commented  · 

        I agree with tjbarbour - command line runner would be a great start

      • tjbarbourtjbarbour commented  · 

        I say 1st version just allow command line running of .linq files and either dump the output out or take another parameter where to save it. Later versions / iterations can provide more sophisticated piping / API access.
        Thanx!

      • andremoraesandremoraes commented  · 

        It'll be really nice to accept cmd line and automation as com object so we can use also in simple VBS scripts

      Feedback and Knowledge Base