Delete the existing app before trying to Add application

Topics: Server Deployment
Apr 2, 2013 at 9:33 PM

I created MSI using Build Server Deploy MSI. Incremented ProjectVersion , ProductVersion and generated new ProductId. But, when I try to install it using MSI it is erroring out with error "Application already exists. Specify a unique application name." Do we need to delete the application manually everytime before running the MSI? Please advice.
Apr 3, 2013 at 2:49 AM
Can you please explain the steps you are taking to install and deploy the application using the MSI? You should install the MSI on your server and either check the "deploy at Finish" checkbox at the end of the wizard, or go to the Start menu and launch the Deploy shortcut for your app. Are you trying to use BizTalk Admin to deploy or install your app?

Apr 3, 2013 at 3:01 PM
I updated my proj to use Deployment framework. Following are the property settings in dtdfproj file.

I am selecting the option "deploy at Finish" option in the wizard. First time installation is going through fine. For the upgrade, I did increment ProjectVersion , ProductVersion and generated new ProductId. It is erroring out when installing the upgrade using the same steps ( "deploy at Finish" checkbox ).

Also, could you please direct me to a Post where complete automation is explained.

<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">x86</Platform>
<!-- Properties related to building an MSI for server deployments -->
<!-- BizTalk App Version Upgrade -->
<!--   For each new product release to be deployed to your BizTalk servers: -->
<!--     1) Increment ProductVersion -->
<!--     2) Generate a new GUID and update ProductId with the new GUID -->
<!--   This allows the new MSI to automatically uninstall (not undeploy!) the old MSI and install the new one. -->
<!-- BizTalk App Version Upgrade -->
<ProductName>PDSBTS for BizTalk</ProductName>
<Manufacturer>Deployment Framework User</Manufacturer>
<!-- NEVER change the ProductUpgradeCode. -->
Apr 3, 2013 at 4:49 PM

In an upgrade scenario, before you upgrade (or uninstall old/install new) the MSI you must undeploy the existing application. These steps are covered here.

Regarding complete automation of deployments, I recommend that you start here (and reference this post too).

Apr 16, 2013 at 6:21 PM
Hi Tom,

I am not able to access both the URLs you provided for Automated Deployment. Could you please provide the latest.

Apr 16, 2013 at 7:10 PM
Apr 24, 2013 at 2:25 PM
Edited Apr 24, 2013 at 3:16 PM
Hi Tom,

Can you please tell me the syntax to undeploy the application completely?

I am trying to do the following.

1) We have separated a Schema into a separate project as it is huge and deploys are becoming slow because of this. As there will not be any frequent changes to this schema, to avoid Deployment Delays , We created this as a Separate application.

2) Second application has the remaining artifacts. This will have a reference to the Schemas project I mentioned above.

As Second application is dependent on the First ( Schemas), I cannot deploy first application until Second application is completely undeployed. I created a batch file to Uninstall/UnDeploy Second application and then follow up with Deploying First Application and Second Application in order.

Issue: I am able to UnInstall the application using msiexec, but it will not undeploy the application completely ( remove dlls from GAC). Can you please let me know if there is any way to accomplish.

Apr 24, 2013 at 6:04 PM
Hi Pavan,

Have you run through the Deployment Framework tutorial and gotten a good understanding of the manual process before using scripting? You can find it here. There is also information on the upgrade process here.

In the scenario you describe, the process to deploy for the first time is:
  1. Install First application
  2. Deploy First application
  3. Install Second application (this can be swapped with #2 if desired)
  4. Deploy Second application
To upgrade Second application:
  1. Undeploy Second application
  2. Uninstall Second application
  3. Install Second application (can be combined w/ #2 if you change the ProductID and increment ProductVersion in the .btdfproj for the new MSI)
To upgrade First application:
  1. Undeploy Second application
  2. Uninstall Second application
  3. Undeploy First application
  4. Uninstall First application
  5. Install First application
  6. Deploy First application
  7. Install Second application
  8. Deploy Second application
When you change ProductID and ProductVersion for the new MSI's you can slightly shorten it to:
  1. Undeploy Second application
  2. Undeploy First application
  3. Install First application
  4. Install Second application
  5. Deploy First application
  6. Deploy Second application
Apr 24, 2013 at 6:36 PM
Edited Apr 24, 2013 at 6:36 PM
Thanks Tom.

I went through the tutorials. As developers donot have access to Production environments, we are providing .bat file along with MSI to do the deployment. In the .bat file we are calling it in the following sequence.

1) Undeploy Application 1 ( if exists)
2) UnInstall Application 1 ( If exists)
3) Uninstall Application 2 ( If exists)
4) Install First Application
5) Install Second Application
6) Deploy First Application
7) Deploy Second application

Initially, I was not able to find syntax for UnDeploy. After some research, Found the following syntax

%BTDFMSBuildPath% Deployment.btdfproj /p:%PARMS% /target:Undeploy /l:FileLogger,Microsoft.Build.Engine;logfile=%ApplicationInstallPath%\DeployResults\DeployResults.txt

It worked fine. .bat file is now all ready for complete automation.

Thanks a lot for your help! Biztalk Deployment Framefork is such a great product. It made life lot easier.

Apr 25, 2013 at 5:50 AM
Thanks Pavan, it's great to hear the positive comments!