12

I'm using Entity Framework 4.2 June 2011 CTP in a small web application (ASP.NET MVC 3) because it supports enums.

I tried to deploy it using web deploy and I get the following error :

The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.2'.

How to create an application pool running on .NET 4.2 ?

Edit: The web application does work with a 4.0 app pool so the real question is how to disable the app pool runtime version check when using Visual Studio Publish option ?

Catalin DICU
  • 4,610
  • 5
  • 34
  • 47

2 Answers2

17

I found the solution here: http://connect.microsoft.com/VisualStudio/feedback/details/526963/unable-to-correctly-set-managedruntimeversion-in-msdeploy-package

Add this to the web .csproj file in the initial <PropertyGroup> section:

<IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion>
derekerdmann
  • 17,696
  • 11
  • 76
  • 110
Catalin DICU
  • 4,610
  • 5
  • 34
  • 47
2

There is no .Net framework 4.2 out there, i would imagine the .net 4 sp1 is missing or you are not including all needed references. try installing sp1 on the server.

dove
  • 20,469
  • 14
  • 82
  • 108
Davide Piras
  • 43,984
  • 10
  • 98
  • 147
  • 1
    see this: http://blogs.msdn.com/b/adonet/archive/2011/06/30/announcing-the-microsoft-entity-framework-june-2011-ctp.aspx – Catalin DICU Sep 09 '11 at 18:24
  • wow it looks like they made another version of the .NET Framework then. A bit risky to use a CTP in a prod environment. If you have full control of the web server then you should install this CTP there are well and I guess you will be able to create an application pool which runs in this runtime framework. I would not do it anyway. – Davide Piras Sep 09 '11 at 18:27