I guess I could add a -nuservers option. You'd need to specify each of the desired server(s) in sequence. Is there a use-case? (For this versus global config)
Alpha/Beta queries will usually go to live nuget server while production queries will usually either let a local nuget server override (or forbid external nuget server reference altogether as it is by IT often considered a potential liability/attack vector). This will depend not only on what the queries do, but also the execution context, what the target data is as well as the set of privileges under which it executes rather than the computer on which it is installed. But lprun.exe is a huge win, no matter what.
If you don't mind poking the global config, you could write a query like this to change where LINQPad downloads NuGet packages, then call it as follows:
That works. Thanks! Probably something that would work for query provided data connections as well? Having the possibility to set details from within the query (or query header) helps xcopy deployment.
Yes - you can specify query connection details entirely in the header of a .linq file. To see how it's done, look at a .linq file saved via the LINQPad GUI.
Notice that there's an ID element in connection details of type Guid. If you omit this, LINQPad won't go looking in the global connections file and will simply use the details supplied.
I would like to think of this as the first step in separating the gui from the backend so that we can have a mono capable back end with a different ui....
Seems very promising. Is there an option to pass commands like Perl -e option, without any script file needed ? For example in Perl: perl -e "my $v=1; print $v+2;" would be in C# : lprun -e "int i = 1; Console.Write(i + 2);" (option name to be defined)
The output below shows that Console.Error.WriteLine and exception messages are still written to stdout instead of stderr, which is inconvient for me as I intent to use lrpun in TortoiseSVN's client-side pre-commit hook which displays only stderr when exit code is non-zero. May I confirm that this feature is not yet implemented?
Comments
But lprun.exe is a huge win, no matter what.
Probably something that would work for query provided data connections as well? Having the possibility to set details from within the query (or query header) helps xcopy deployment.
Notice that there's an ID element in connection details of type Guid. If you omit this, LINQPad won't go looking in the global connections file and will simply use the details supplied.
Is there an option to pass commands like Perl -e option, without any script file needed ?
For example in Perl: perl -e "my $v=1; print $v+2;"
would be in C# : lprun -e "int i = 1; Console.Write(i + 2);"
(option name to be defined)
I've checked that LINQPad 7 is redirecting to stderr as expected but LINQPad 5 doesn't.
Will it be ever supported? Could it be somehow hacked?