Home

lprun.exe for LINQPad5 ends silently without doing anythig

I have both LINQPad 4 and LINQPad 5 installed on my server. Also I have some LINQPad scripts that should be started by my SQL server as jobs. Everything works fine with lprun.exe for LINQPad 4. Unfortunately, when I try to run my scripts with lprun.exe for LINQPad 5, they end silently (without any message) and do nothing.

To make the things clean, I've created a very simple LINQPad script like the following. Please notice, it has a database connection (to any database) and a static extension class MyOwnExtension - it is important to have both in the script.
<Query Kind="Program">
  <Connection>
    <Server>.\SQLEXPRESS</Server>
    <Database>master</Database>
  </Connection>
</Query>

void Main()
{
	Console.WriteLine("Hello, {0}!", Environment.UserName);
}

// Define other methods and classes here
public static class MyOwnExtension
{
	// Just a syntax sugar: Format a string
	public static string Apply(this string format, params object[] args)
	{
		return string.Format(format, args);
	}
}
This LINQPad script runs fine with lprun.exe for LINQPad 4 showing "Hello, ..." line and ends silently (without any message) with lprun.exe for LINQPad 5. The same script runs fine with both GUI LINQPad 4 and GUI LINQPad 5 (I see the expected message in the result panel).

When I remove the database connection or the static extension class from this script, lprun.exe for LINQPad 5 executes this modified script as expected and I see the expected message line.

So, my question is why lprun.exe for LINQPad 5 does not execute such simple LINQPad script which have both a database connection and a static extension class? What I am doing wrong?

Comments

Sign In or Register to comment.