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%
/P:OutputPath=bin\
/P:Configuration=%env.configuration%
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:MsDeployServiceUrl=https://%env.TargetServer%/MsDeploy.axd
/P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=WMSvc
/P:CreatePackageOnPublish=True
/P:UserName=%env.domainUser%
/P:Password=%env.domainPassword%

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

best regards,
Martin Helgesen

3 comments
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:
http://technet.microsoft.com/en-us/library/cc754523%28v=ws.10%29.aspx

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,
Oleg.

0
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
http://stackoverflow.com/questions/12026754/msbuild-deploy-failing-after-upgrade-to-net-4-5

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

0
Comment actions Permalink

Glad to hear that. Thanks for the link.

0

Please sign in to leave a comment.