Publish a project in a visual studio

I try to post and I get an error

Error 1 The network deployment task could not be completed. (The application pool you are trying to use has the "managedRuntimeVersion" property set to "v2.0". This application requires "v4.0". Find out more: http://go.microsoft.com/fwlink/?LinkId= 221672 # ERROR_APPPOOL_VERSION_MISMATCH .) 0 0 HacmeBank_V2_Website

Does anyone know how to resolve?

Thank you

+4
source share
4 answers

It seems that the IIS settings do not match.

If you go to IIS Manager and go to Application Pools and find the published folder (project name)

Select Published Project from the list.

Click Basic Settings from the Actions pane.

Change the version of the .NET Framework to v4.0xxxxx

+4
source

There was the same problem when installing Orchard CMS. Keep targeting v2.0. But find a simple solution: in IIS, in application pools (a list with all application pools), you can find the second upper right list of settings: "Set application pool settings ...", by default, from 2.0 to 4.0 et, voila.

+3
source

It looks like your project is targeting the .net 4.0 framework, but there is a parameter in your publish thread that indicates .net 2.0

I never published this way, but this error looks like what I saw before integrating different libraries designed for different frameworks ...

+1
source

It is decided:

All the above did not solve my problem, just changed the Targeted Framework in visual studio from 4.5 to 4.5.1 and solved the problem

+1
source

Source: https://habr.com/ru/post/1480979/


All Articles