Reputation: 205
i try to publish and i get an error
Error 1 Web deployment task failed. (The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v2.0'. This application requires 'v4.0'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH.) 0 0 HacmeBank_V2_Website
someone know how to resolve ?
thank you
Upvotes: 4
Views: 3837
Reputation: 2718
Solved:
All above didn't solve my problem , just changed Targeted Framework in visual studio from 4.5 to 4.5.1 and Problem Solved
Upvotes: 1
Reputation: 238
Had the same problem when installing Orchard CMS. Keep targeting v2.0. But find the simple solution: in IIS, on the Application Pools (the list with all application pools), you can find the 2nd setting top right list: "Set Application Pool Defaults.." change there the default from 2.0 to 4.0 et, voila.
Upvotes: 3
Reputation: 382
It looks like your IIS settings are not matching.
If you go to your IIS Manager and navigate to Application Pools and look for the published(your Project name) folder
Select your Published project from the list
Click on Basic Settings from Actions pane
Change the .NET Framework Version to v4.0xxxxx
Upvotes: 3
Reputation: 1143
It sounds like your project is targeting the .net 4.0 framework, but there is a setting in your 'publish' flow that specifies .net 2.0
I've never published this way, but this error looks like something I've seen before integrating different libraries targeting different frameworks...
Upvotes: 1