Deploy solution on development system

Topics: Getting Started/Beginner, Server Deployment
Mar 13, 2014 at 11:15 AM
Hi there,

I want to quick deploy my solution on my development system to test it by simply clicking the single right arrow in the BTDF toolbar. The first time this worked just fine. But now I get an error saying that the application already exists. I assume that BTDF isn't allowed to remove the app because it's the default app on that system.

Is there anything I can do to get around this issue? I mean I could add another empty app and make it the default app as a workaround. But what if I want to deploy on my live system? I don't want to change the default app in live just because I want to deploy a new version.

Any idea?
Coordinator
Mar 14, 2014 at 5:42 AM
It sounds like you have either deleted "BizTalk Application 1" or deployed into it, or perhaps made a different app the default. The Deployment Framework expects to fully control the target application, so if it's the default app then, as you experienced, it can't be deleted.

In my experience with many BizTalk environments over many years, I've never encountered one that doesn't have "BizTalk Application 1" sitting there untouched and ignored. As a result, I've never touched an environment where "BizTalk Application 1" is not the default app. I suppose that kind of became an unwritten assumption of the Deployment Framework early on, basically ignoring that the concept of a default app even exists.

If you did indeed remove "BizTalk Application 1" then my personal recommendation, right or wrong, is to do as you suggested and add an empty default app.

Thanks,
Tom
Mar 14, 2014 at 9:38 AM
Hi Tom,

you are absolutely right. I deleted Application 1 because at the moment we have 3 solutions on our system and the 4th is going to come up in autumn this year. Since we only have 5 applications allowed in our license, we would like to get rid of this stupid App 1.

In the meantime I already created a new empty solution and made it default app to be able to go ahead with my real solution. So, that's my workaround for the moment. But I don't know what to do in future.


Best regards,
Horst
Coordinator
Mar 14, 2014 at 2:54 PM
I see -- the Standard edition app limit is a big pain. I looked into this some more and have something for you to try. By default, the Deployment Framework still undeploys an app piece by piece except for BRE policies. As a result, I believe that the app delete/add is really not important to the overall process.

Try putting this into the .btdfproj for the app that is the default app (this is untested):
<Target Name="DeployAppDefinition" DependsOnTargets="VerifyBizTalkAppExists">
  <Exec
    Command="BTSTask.exe AddApp -ApplicationName:&quot;$(BizTalkAppName)&quot; -Description:&quot;$(BizTalkAppDescription)&quot;"
    Condition="'$(AppExists)' == 'false'" />
  <AddAppReference
    ApplicationName="$(BizTalkAppName)"
    AppsToReference="@(AppsToReference)" Condition="%(Identity) == %(Identity) and '@(AppsToReference)' != '' and '$(AppExists)' == 'false'" />
</Target>

<Target Name="UndeployAppDefinition" Condition="'$(SkipUndeploy)' == 'false'" DependsOnTargets="PrepareAppForUndeploy">
</Target>
This overrides the default targets of the same names. It should still create the app if it doesn't exist, but should never delete the app once it exists.

If you have BRE policies, you should also add the property RemoveRulePoliciesFromAppOnUndeploy set to True.

Thanks,
Tom