none
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: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH. (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.

    Robb

    Saturday, November 10, 2012 2:19 AM

All replies

  • Hi Robb,

    Can you let us know the steps you do? Is there any different from https://tfs.visualstudio.com/en-us/learn/build/continuous-delivery-in-vs/

    Monday, November 12, 2012 2:35 AM
  • Mini,

    The link you provided are the same steps I used to setup continuous deployment to Azure Web Sites from Hosted Azure Hosted TFS (originally TFS Preview).

    The difference is that I am using Visual Studio 2012 Ultimate with the ASP.NET Fall 2012 Update BUILD Prerelease installed.  I am creating a MVC 4 web site setting the target framework to be .NET Framework 4.5 and choosing the Basic Template.

    No other changes or code has been added.  I then follow the steps you linked to for setting up continuous deployment to an empty Azure Web Site.

    Robb

    Monday, November 12, 2012 10:15 PM
  • Hi robb, where you able to fix this problem. im having the same problem . thanks diego

    dz

    Friday, January 25, 2013 6:41 PM
  • Add this property to the project file:

        <IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion>

    Saturday, July 20, 2013 8:38 PM