This project has moved and is read-only. For the latest updates, please go here.

Undeploy and then deploy with different environment-settings does not seem to work

Topics: Server Deployment
Apr 9, 2013 at 9:41 AM

Say I deploy a solution and select my "prod-test" environment settings file. This works perfectly. All prod-test values are set as expected in the binding. But if i then undeploy, and the deploy again, selecting my test environment settings file, the prod-test values are still being set in the binding!

In my prod-test bindings i use a folder named "biztalkPT" and in the test bidnings i use a folder named "biztalkT".

This is what the log says:
            Target PreprocessBindings:
                Clearing file attributes for 'PortBindingsMaster.xml'.
                "C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\Framework\DeployTools\xmlpreprocess.exe" /f /v /c /noDirectives /i:"C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\PortBindingsMaster.xml" /o:"C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\PortBindingsMaster.xml" /d:CurDir="C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0" /s:"C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\EnvironmentSettings\TEST_settings.xml"
                XmlPreprocess v2.0.13.0
                Copyright (c) 2004-2010 Loren M Halvorson
                XML File Preprocessor
                Settings XML file: "C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\EnvironmentSettings\TEST_settings.xml"
                Preprocessing "C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\PortBindingsMaster.xml" to "C:\Program Files (x86)\Hemit.BizTalk.KrypterOgSendBKM\2.0\Deployment\PortBindingsMaster.xml"...
                PortBindingsMaster.xml : Set the value 'Hemit.BizTalk.KrypterOgSendBKM' of 10 node(s) matching XPath '//ApplicationName'.
            Target DeployFileAdapterPhysicalPaths:
                The BTSACCOUNT environment variable must be set up in InstallWizard.xml for automatic configuration of permissions for FILE adapter physical paths.
                Configuring FILE adapter physical paths from binding file PortBindingsMaster.xml...
                  Processing FILE adapter physical paths (Send)...
                     Setting up path '\\\biztalkpt\Fildropp\ErrorFolder\BKMErr'...
                       Directory already exists.
                     Setting up path '\\\biztalkpt\fildropp\BKM\EbMSReceipt'...
                       Directory already exists.
                     Setting up path '\\\biztalkpt\Fildropp\ErrorFolder\BKMErr'...
                       Directory already exists.

and so on and so on...
As you see here, it has selected the right settings file (TEST_settings.xml), but its still using the values from the PRODTEST_settings.xml (biztalkPT instead of biztalkT) from the first deploy.

If i do an undeploy, uninstall the msi, reinstall the msi and THEN do a deloy with test, it all works like a charm.

Is this a bug or am i missing something?

John Viggo Grønbech
Apr 9, 2013 at 8:24 PM
Hi John,

I see something unexpected here. In the XmlPreprocess command line, the input and output files are the same, which should not be the case. Therefore, once you deploy the first time, PortBindingsMaster.xml is no longer a template -- it is now a final bindings file. The normal output file is PortBindings.xml. It seems that you have modified the property PortBindings.

Do you have UsingMasterBindings set to True as well as an override of PortBindings?