deploy is skipping UndeployAppDefinition target

Topics: Server Deployment
Oct 10, 2013 at 9:03 PM
I am trying to deploy an msi that another developer built (so I don't have immediate acces to the btdfproj file). I'm getting this error "error : Application 'blah.blah.blah' already exists. Specify a unique Application name."

I see in the deployment log that "Target UndeployAppDefinition" doesn't show up.

What would cause that target to be skipped?

I'm trying to reinstall that same msi over the top of itself, but that has never been a problem on other apps (using BTDF 5.0). This msi was built with BTDF 5.1 if that makes a difference.

Oct 11, 2013 at 7:22 AM
Sounds like you are trying to do a deployment on a server where the application has previously been deployed. In that case you must use the Redeploy command, not Deploy. Even then it's possible to have issues depending on the degree of difference between the previous and new app configurations.

Oct 11, 2013 at 1:31 PM
Yes, that is exactly the what I'm trying to do. I'm using a variation of Randy Paulo's deployment script. With BTDF 5.0 msi's I've never had to do anything special to redeploy.

I'm not sure what Deploy and Redeploy commands you are referring to. I pass "/target:Deploy" to MSBuild whether it is new application or a redeploy, and it has always worked until trying it with this BTDF 5.1 msi. Is that what you are talking about, or something completely different.

I'm trying to figure out something is wrong in the project, or if something has changed in 5.1 and I need to change my deployment process for BizTalk 2013.

Oct 11, 2013 at 3:29 PM
Since this is on a server, are you passing /p:Configuration=Server? There has always been a clear distinction on a server (MSI) deploy between "deploy" and "redeploy". Deploy will fail if the app already exists, and Redeploy will not. Redeploy when '$(Configuration)' == 'Server' acts like regular Deploy when '$(Configuration)' is Debug or Release, which are only used for developer workstations.

If you look at the end of BizTalkDeploymentFramework.targets, you'll see the command line inside the target LaunchServerRedeployWizard (the part after SetEnvUI.exe -- which starts the wizard UI).

The Deploy/Redeploy behavior has been in place for many years, if not since the beginning, and what you will find when using the Start menu commands. I'm guessing you might not be using Configuration = Server.

Oct 11, 2013 at 5:26 PM
I'm passing "Configuration=Server" to MSBuild as one of the parameters. The deploy that failed was part of a batch install. I went back and tried redeploying the msi by itself and it worked fine. It uses the same script both ways, but I must have a bug in my system somewhere. Thanks for your help.