Question

When I use a LINQPad.config file when running any C# statement, LINQPad stops working. It doesn't seem to matter what's actually in the config file. I've even tried using an empty config file and the same thing happens.

In trying to solve this problem, I discovered that calling

AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.Dump()

returns

C:\Program Files (x86)\LINQPad4\LINQPad.config
C:\Program Files (x86)\LINQPad4\LINQPad.config

This is the correct path to my config file, however I would have expected to see the path listed only once. I suspect this may be a clue to solving the problem, but I'm unsure how to proceed. In addition to installing the 32-bit version of LINQPad, I have the 64 bit version on my desktop (not installed via installer) so I'm not sure if that might have played a role or not.

Was it helpful?

Solution

Probably something wrong with your configuration file and a totally empty config file isn't valid either.

Try a minimal file such as

<?xml version="1.0" encoding="utf-8"?>
<configuration>
</configuration>

OTHER TIPS

Here's the standard LINQPad.config, in case you need it:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
  <runtime>
    <legacyUnhandledExceptionPolicy enabled="1" />
  </runtime>
</configuration>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top