Deploying .Net 4.5 Web Site on IIS 7.5 Server

We use Teamcity for continuous integration builds for our site and have just upgraded our site to .Net 4.5RC. The application creates and runs in IIS, expressing on my mailbox and builds on our server assembly, which I installed .NTt 4.5RC on. But when we deploy it to the server on which .Net 4.5RC is installed, we get the following error.

The application pool you are trying to use has the "managedRuntimeVersion" property set to "v4.0". This application requires "v4.5".

What can I do to fix this problem. I tried to install the application pool on the server on 4.5, but I can not. See this SO post .

+8
teamcity
source share
5 answers

It turns out this is a TeamCity problem. When we push the update directly to the site from Visual Studio 2012 RC, it works great. We had to change the build runner in TeamCity to the command line runner that invokes WebDeploy 3.0 VS 2012.

+4
source share

I had a similar problem. I created my application by invoking MSBuild, and found that when I tried to deploy the application web, I got this error. I fixed this by telling MSBuild to create using VS2012 by adding a command line switch to the MSBuild command:

/P:VisualStudioVersion=11.0 

Customize your hat to this question .

+14
source share

origin: http://forums.iis.net/t/1164093.aspx/1

says: "double-click the application pool and then change the version of the .Net Framework"

+1
source share

I ran into the same problem even after using /P:VisualStudioVersion=11.0 , and also ignored the version of managed time in the proj file.

Run the command

 C:\Windows\System32\inetsrv>appcmd set apppool /apppool.name: DefaultAppPool /managedRuntimeVersion:v4.5 

After that reset ISS.

+1
source share

OK - fair enough. You need to use IIS 7.5, you need to target .Net 4.5 ... and they must be mutually compatible.

Check out this link; Search for "Aspnet_regiis.exe":

http://msdn.microsoft.com/en-us/library/ee942158.aspx

'Hope this helps .. PSM

PS:

These links may (or may not) also be useful:

Please write back what you find.

0
source share

All Articles