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

Removing unnecessary warnings

Topics: General Questions, Getting Started/Beginner
May 19, 2014 at 12:00 PM
Is there anyway to remove the unnecessary warnings from the output?

I get a lot of the warning ...
EXEC : warning : If any of the assemblies were previously loaded by a Host Instance, it may be necessary to restart the Host Instance for changes to take effect.
in my deployment results file, which makes checking things have worked Ok a bit of a pain.

It'd be nice of there was someway to remove the "non-warning" warnings and leave just the real warnings.
May 19, 2014 at 4:57 PM
The MSBuild Exec task that is used to run BTSTask.exe has a parameter IgnoreStandardErrorWarningFormat and two related properties CustomWarningRegularExpression and CustomErrorRegularExpression. Presumably one could set IgnoreStandardErrorWarningFormat to True and try to come up with regular expressions for the other two properties that would capture errors and warnings that we want while excluding those that we don't.

The hard part is trying to come up with workable regular expressions that won't lose errors and warnings that we care about.

Nov 11, 2014 at 10:14 PM
Edited Nov 11, 2014 at 10:17 PM
On top of the aforementioned warning, I am also getting a few of the following one:
EXEC : warning : Assembly "Be.Stateless.BizTalk.Transforms, ..." depends on the following assemblies that must be installed in the Global Assembly Cache for runtime to succeed:
Assembly "Be.Stateless.BizTalk.Schemas, ..."
This an erroneous warning as per BTDF, which deploys schemas before transforms.

Here are some workable regular expressions they you can add to the Exec tasks. I did this for all the BTDF deploy targets that I am using and that are both relying on BTSTask and exhibiting the symptoms. They do seem to work for me, well at least they discard the annoying warnings:
CustomErrorRegularExpression="^(?i:(?!command succeeded).*(error).+)$"
CustomWarningRegularExpression="^(?i:(?!command succeeded).*(warning)(?!.+(may be necessary to restart the Host Instance|depends on the following assemblies that must be installed)).+)$"
@ Tom

Maybe you could systematically add them into BTDF? Or better yet, provide some properties that one could chose to overwrite, rather than having to redefine the BTDF targets that are concerned (similarly to the example provided below)!

As a side note, I am now using BTS 2013 R2 and BTDF 6.0, but I was used to BTS 2009 and BTDF 5 RTW. The issues were already present back then, but probably because the Exec MSBuild task worked differently, they were not reported as warnings. To get the exact (or so it seems) same behaviour as with BTS 2009 and BTDF 5, one would not need any regular expression but could simply use the following Exec attribute:
Finally, as an example, here is what I am doing on my projects:
  • on the basis of this property, conditionnally import a set of MSBuild targets, just after having imported the regular BTDF targets, (in my case, declared in the custom targets file, see line 72 of BizTalk.Factory.Deployment.targets)
<Import Project="BizTalk.Factory.Deployment.IgnoreStandardErrorsAndWarnings.targets" Condition=" '$(IgnoreStandardErrorWarningFormat)' == 'true' " />