Problem with WebDeploy on .net 4.5 solution

Hello, and thanks for a great product, we have bought the enterprise version.

But when we upgraded our solutions to .net 4.5, the msbuild tasks which used webdeploy to target another webserver stopped working. (it worked when solutions were .net 4.0)

[VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3847, 5): Web deployment task failed.((17.08.2012 08:52:22) An error occurred when the request was processed on the remote computer.)
The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'.

There is no such thing as an application pool with runtimeversion 4.5? I have .net 4.5 installed on the target webserver.
the build task looks like this:

Runner type: msbuild
msbuild version: 4.5
run platform: x86
commandline parameters: /P:DeployIisAppPath=%env.nameonwebsite%

Any help on the subject would be appreciated.
Have a nice day :)

best regards,
Martin Helgesen

Comment actions Permalink

Hi Martin,

If you are using IIS7, you can set the .NET version for your application's app pool on the target server following these instructions:

I think after you installed .NET 4.5 and flipped the code to target it you also need to update the app pool setting.

Please comment on whether this helped or not.

Best regards,

Comment actions Permalink

Thanks, but .net framework 4.5 is not a new runtime, so the 4.0 appool is correct.

I found the solution here. msbuild must now be specified with which version of visualstudio to be used

Add a property to the msbuild and it'll be okay :)

Comment actions Permalink

Glad to hear that. Thanks for the link.


Please sign in to leave a comment.