title: Web deploy error to IIS - application pool managedRuntimeVersion
body: <p>When trying to deploy an ASP.NET application deployment package to IIS, I receive an error </p>
  
  <blockquote>
    <p>(The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v2.0'. This application requires 'v4.0'.</p>
  </blockquote>
  
  <p>I have taken these steps:</p>
  
  <ul>
  <li>ensured my server's default .NET Framework version is 4 (restarted the IIS service on the machine)</li>
  <li>ensured my web application is set for .NET 4</li>
  <li>ensured the application's web.config has no references to requiring .NET 2 or 3.5</li>
  </ul>
  
  <p>What is the root cause of this error, and how can it be solved?</p>
  
  <p><img src="https://i.stack.imgur.com/KeBY5.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/GLwbJ.png" alt="enter image description here"></p>