title: MSTest refuses to run 64-bit?
body: <p>I am writing tests for an application using Outlook Redemption that absolutely must run 64-bit (it connects to windows MAPI and Outlook x64).  Unfortunately, I cannot for the life of me make it run the test in 64-bit.  I have tried using a <code>.runsettings</code> file (edited to indicate 64-bit) and a <code>.testsettings</code> file (also edited), and finally I have selected <code>Test&gt;TestSettings&gt;Default Processor Architecture&gt;64-bit</code>, to no avail.</p>
  
  <p>Every time, System.Environment.Is64BitProcess is false, and when I load the dll to connect to Outlook and MAPI I get the dreaded COM Exception: <code>Wrong OS or OS version for application (Exception from HRESULT: 0x800401FA (CO_E_WRONGOSFORAPP))</code> which indicates that 64-bit Outlook is installed and the process trying to access it is 32-bit.</p>
  
  <p>I have restarted VS 2012 after making settings changes as I have read somewhere that a restart may be necessary.  Does anyone have any other suggestions?  I <em>could</em> just write this as a console app that runs informal tests and reports their status, but my next step is to get these tests integrated into the automated build.  Any help would be greatly appreciated.</p>
  
  <h1>Edit</h1>
  
  <p>Screenshot of Host Settings page in .testsettings
  <img src="https://i.stack.imgur.com/Qdwq8.png" alt="enter image description here"></p>
  
  <h1>Experiment</h1>
  
  <p>Interestingly, I did a little experiment.  I created a new solution with a single console app project.  I put a public method in there that just returned true.  When I ran the console app, and paused execution, I looked and indeed it is running 64-bit; no problem there.  I then added a test project, created a single test which called the method.  I also added <code>var is64 = Environment.Is64bitProcess</code> and put a breakpoint after it.</p>
  
  <p>Predictably, without changing any options, is64 was false.  I chose the 64-bit default architecture from the dropdown under test, then cleaned the solution, and ran the test again, same result, running 32-bit.  I restarted VS2012, cleaned, built, same result.  I created a testsettings file and referenced it in the Test menu, clean build, same, restart,clean, build same.  I created a runsettings file, set <code>&lt;TargetPlatform&gt;x64&lt;/TargetPlatform&gt;</code> , referenced that in the test menu, ran through it all again, and came up with the same results.  QTAgent32.exe continues to run the process, and absolutely refuses to heed my demands that it run 64 bit.  </p>
  
  <p>I swear, if I have to delete QTAgent32.exe and rename QTAgent to that name, I will.  I am not above cramming my wishes down the computers throat when it wants to be obstinate.  Please, if you dont want to see me mistreat a workstation, someone show me what is going wrong.  Think of the computers.</p>