title: Fix a side-by-side error in .NET application
body: <p>I am porting a C# program from Visual Studio 2010 to Visual Studio 2013. Both are Express versions of the IDE. In the 2013 build I encounter a side-by-side failure.</p>
  
  <p><code>The application has failed to start because its side-by-side configuration is incorrect.</code></p>
  
  <p>The <code>sxstrace.exe</code> tool does not provide any information that I was able to interpret usefully. Here is the human readable output from the tool.</p>
  
  <blockquote>
    <p>Begin Activation Context Generation.</p>
    
    <p>Input Parameter:</p>
    
    <p>Flags = 0</p>
    
    <p>ProcessorArchitecture = AMD64</p>
    
    <p>CultureFallBacks = en-GB;en;en-US</p>
    
    <p>ManifestPath = C:\Users\Brian\Documents\Visual Studio
    2013\Projects\WebInterface1\WebInterface1\bin\Debug\WebInterface1.exe</p>
    
    <p>AssemblyDirectory = C:\Users\Brian\Documents\Visual Studio
    2013\Projects\WebInterface1\WebInterface1\bin\Debug\</p>
    
    <p>Application Config File = C:\Users\Brian\Documents\Visual Studio
    2013\Projects\WebInterface1\WebInterface1\bin\Debug\WebInterface1.exe.Config</p>
    
    <hr>
    
    <p>INFO: Parsing Application Config File C:\Users\Brian\Documents\Visual
    Studio
    2013\Projects\WebInterface1\WebInterface1\bin\Debug\WebInterface1.exe.Config.</p>
    
    <p>ERROR: Activation Context generation failed.</p>
    
    <p>End Activation Context Generation.</p>
  </blockquote>
  
  <p>With little information to go on, I suspected the problem may be Interop related so I proceeded with a few experiments, none of which resolved the problem.</p>
  
  <p>The application interoperates with Excel, originally, <code>Excel 2003</code> from <code>Office 2003 Professional</code>. Since <code>Office 2003 Professional</code> is obsolete, I upgraded to <code>Office 2013 Home and Student</code> and converted the Excel file that my application needs to interoperate with. The upgrade did not make a noticeable difference when my application is run; the side-by-side failure persists.</p>
  
  <p>The Interop DLL was <code>Microsoft.Office.Interop.Excel.dll</code> (carried over like "source code" from the VS 2010 project, and before that, a VS 2008 project, so I don't know about its pedigree) but in order to try any random thing to fix the side-by-side problem, I attempted to use a different reference to re-build. Under the <code>Add Reference &gt; Assemblies &gt; Framework</code>, there is no reference that appears to be Excel Interop-related. Likewise there is none under <code>Add Reference &gt; Assemblies &gt; Extensions</code>. I mention this because in this other Q and A <a href="https://stackoverflow.com/questions/15285880/how-to-reference-microsoft-office-interop-excel-dll">(link)</a>, you can see that in VS 2012 and VS 2010, it seems that it should be possible to resolve references by finding <code>Microsoft.Office.Interop.Excel</code> in the reference manager, but unfortunately, not in my installation of VS 2013.</p>
  
  <p>Under <code>Add Reference &gt; COM</code>, there is a reference called <code>Microsoft Excel 15.0 Object Library (Version 1.8)</code>. This allows the project to build but the side-by-side failure persists. This <a href="http://msdn.microsoft.com/en-us/library/15s06t57.aspx" rel="nofollow noreferrer">MSDN page</a> seems to indicate that this is the right way to resolve the reference when using VS 2013, so I don't have to worry about the pedigree of the DLL that has been carried over several years. </p>
  
  <p>What else should I try to resolve the side-by-side failure?</p>
  
  <p><strong>Update</strong> I removed all VS Redistributables that support C++. As already mentioned, I am using C#. I removed and re-installed VS 2013. I removed Office 2003. The <code>side-by-side configuration is incorrect</code> failure persists.</p>