How do I set the managedRuntimeVersion property in a Continuous Deployment to Azure Web Sites?

    General discussion

  • I am having a problem with a project which was Built using VS2012 and setup to Continuous Deploy to an Azure Web Site that targets .NET Framework 4.5.

    I have the the Target Framework set to .NET Framework 4.5 on the Project Properties > Application Tab.  The Web.Config file also has <httpRuntime targetFramework="4.5" /> and <compilation debug="false" targetFramework="4.5" /> under <system.web> element.

    Everytime I check-in changes the Build is triggered, but fails with the following error:

     Exception Message: The application pool that you are trying to use has the 'managedRuntimeVersion' property set to 'v4.0'. This application requires 'v4.5'.
      Learn more at: (type DeploymentDetailedException)
    Exception Stack Trace: 
    Server stack trace: 
       at Microsoft.Web.Deployment.AgentClientProvider.RemoteDestSync(DeploymentObject sourceObject, DeploymentSyncContext syncContext, Nullable`1 syncPass)
       at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId)
       at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
       at Microsoft.TeamFoundation.Deployment.Workflow.Activities.MSDeployWorker.RunCommand(String publishEndpoint, String targetSite, String userName, String password, String packagePath, String setParametersPath, Boolean allowUntrustedCertificates) in d:\a1\dd\alm\tfs_core\Build\Workflow_Deployment\Activities\MSDeploy.cs:line 222
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    Exception rethrown at [0]: 
       at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
       at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
       at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

    If I directly right-click on the Project in VS2012 and choose Publish, I get no errors and the project deploys correctly and functions.


    Saturday, November 10, 2012 2:19 AM

All replies