Possible bug with Package of Web project using .Net 4.5
-
Tuesday, October 16, 2012 8:36 PM
When you create a deploy package for a web project that uses .Net 4.5 there is a problem when you try to deploy it. You will get an error that says that there is an app pool .Net framework mismatch. Here is why...
The website that you deploy to will be using an app pool that is not greater than .Net 4.0. There is really no way to set a web app pool to greater than 4.0 even with 4.5 installed because .Net 4.5 is not a side by side framework but an overlay. So if you need to use .Net 4.5 functionality in your assemblies they must reference it individually.
Here is the error:
Error Code: ERROR_APPPOOL_VERSION_MISMATCH
More Information: The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH.
Error count: 1.Here is the solution to the problem:
Open your *.csproj or *.vbproj web project file in a text editor and add the following line.
<IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion>
I added the line just before the line
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
and it deploys without error.
Thanks, -ja
All Replies
-
Thursday, October 18, 2012 6:36 AMModerator
Hi Hohn,
Thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.
Thanks,
Ego [MSFT]
MSDN Community Support | Feedback to us

