title: Run-time Exception System.BadImageFormatException
body: <p>Please help, I've tried everything else I can think of to solve this problem.</p>
  
  <p>And before you respond please note:</p>
  
  <p><em>I have done everything I can from other questions on StackOverflow.com and else-ware on the web. Such as but not limited to: Changing the build configuration from: "Any CPU" to "x64" and even to "x86". And also changing the target build from .NET 4.0 to .NET 3.5 (This does not work as I am using System.Windows.Interactivity that requires .NET 4.0) So I'm rather stuck with .NET 4.0. So please don't give an answer telling me to do this as I have already tried various combinations of this.</em></p>
  
  <hr>
  
  <p>I've got a project in VS2013 called TimersXP that is an open-source project on CodePlex.com:
  <a href="https://timersxp.codeplex.com/" rel="noreferrer">https://timersxp.codeplex.com/</a></p>
  
  <p>It builds without any errors, but I'm getting a run-time exception:
  System.BadImageFormatException was unhandled
  Message: An unhandled exception of type <strong>'System.BadImageFormatException'</strong> occurred in Unknown Module.
  Additional information: Could not load file or assembly 'TimersXP.exe' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.</p>
  
  <p>A little history, the project was originally .NET 3.5, but when I found I had to add System.Windows.Interactivity and that had to support .NET 4.0 I bumped up the version number.</p>
  
  <pre><code>&lt;Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\System.Windows.Interactivity.dll&lt;/HintPath&gt;
    &lt;Private&gt;False&lt;/Private&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p>Yes I know it says version 4.5.0.0. I tried combinations of that as well. unless I missed some combination that works different that what would be expected.</p>
  
  <p>It's open source so all of the code for the project is available, can someone please help me out? I'm afraid I am out of ideas.</p>
  
  <p>Maybe in the App.config file this version number?</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  &lt;startup&gt;&lt;supportedRuntime version="v2.0.50727"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>I don't want to just go through all of the code and change every place it says version to 3.5 or 4.0 or 4.5. That didn't seem like a very good idea.</p>
  
  <p>As usual, once I see it, I'll probably want to kick myself!</p>