title: How to change Azure App Service to 64-bit
body: <p>I have been having trouble making a request to my 64-bit ASP.NET Core API running on an Azure App Service. The error I get back is:</p>
  
  <blockquote>
    <p>Unhandled Exception: System.BadImageFormatException: Could not load file or assembly '***.dll'. An attempt was made to load a program with an incorrect format.</p>
  </blockquote>
  
  <p>I understand that this means there is a mismatch between the platform of the app (64-bit) and that of the environment it runs on. I just can't figure out how to change the App Service so it runs using 64-bit.</p>
  
  <p>In the Application Settings in the Azure portal I have set Platform to 64-bit:</p>
  
  <p><a href="https://i.stack.imgur.com/nzEtM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nzEtM.png" alt="enter image description here"></a></p>
  
  <p>However when I check in Kudu, the runtime environment indicates that it's operating under win8-x86:</p>
  
  <p><a href="https://i.stack.imgur.com/QFcB8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QFcB8.png" alt="enter image description here"></a></p>
  
  <p><strong>project.json</strong></p>
  
  <pre><code>"buildOptions": {
      "emitEntryPoint": true,
      "preserveCompilationContext": true,
      "platform": "x64"
  },
  
  "runtimes": {
      "win10-x64": {}
  }
  </code></pre>
  
  <p><strong>Some questions</strong></p>
  
  <ol>
  <li>How do I change the App Service to ensure it's running on a 64-bit platform?</li>
  <li>Does it matter that the RID is <code>win8...</code> when my runtimes configuration in <code>project.json</code> specifies <code>win10...</code>. Presumably x86 vs x64 matters, but does it need to be the same version of windows too ie. win8 vs win10.</li>
  </ol>