can deploy/undeploy from VS but not via generated MSI

Topics: Server Deployment
Jun 4, 2014 at 12:51 PM
Edited Jun 4, 2014 at 1:30 PM
Hi.

First of all - thanks for a nice framework it is really helpfull. :-)

Situation:
I have an external assembly which I reference from my BizTalk application. (BizTalk 2013)

Deployment/undeployment from within VS 2012 works fine - but when I try to install the created MSI, the external assembly cannot be found - and I get the error below. Is there any difference when you deploy from Visual Studio compared to executing the generated MSI?

If I install the external assembly in the GAC prior to MSI deployment - everything works fine. it looks as if the MSI installer isn't putting it in the GAC.

I have more than one external assembly and they are all placed under one ItemGroup - is that ok? That is my ItemGroups contain many entries?

Any help is appreciated.

CONFIG:
<ExternalAssemblies Include="KMD.AU.Documents.Trace.dll">
  <LocationPath>..\LoggingBinaries</LocationPath>
</ExternalAssemblies>

.... and the BizTalk assembly which reference it is:
<Schemas Include="$(ProjectName).Fetcher.dll">
  <LocationPath>..\$(ProjectName).Fetcher\bin\$(Configuration)</LocationPath>
</Schemas>
... I use mixed artifact assemblies so only:

<IncludeComponents>True</IncludeComponents>
<IncludeSchemas>True</IncludeSchemas> <!-- We have mixed artifacts everything is regarded as schema assemblies -->
<UsingMasterBindings>True</UsingMasterBindings>
<ApplyXmlEscape>True</ApplyXmlEscape>

is set to true.


ERROR from deploymentresult:
EXEC : error : Referenced assembly "KMD.AU.Documents.Trace, Version=1.0.0.2, Culture=neutral, PublicKeyToken=c223439d722dbdde" could not be located on local machine's filesystem, so it's impossible to determine if its deployment is required prior to deployment of current assembly KMD.AU.WSRM.Fetcher, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5595da4b30f7f56f. If referenced assembly is not BizTalk assembly, register it in GAC or add it as a resource to any application in the group using BizTalk Management Console or btstask.exe specifying type "System.BizTalk:Assembly", then try again.
Coordinator
Jun 5, 2014 at 4:47 AM
The problem is the mixed assemblies. Schema DLL deployment happens before anything else.

Try dropping this in your .btdfproj to force the external assemblies first:
<Target Name="DeployExternalAssembliesBeforeSchemas" BeforeTargets="DeploySchemas" DependsOnTargets="DeployExternalAssemblies" />
Thanks,
Tom
Marked as answer by 2nice on 6/4/2014 at 11:42 PM
Jun 5, 2014 at 6:42 AM
Hi Tom.
Thanks a lot - that worked :-)
I guess I'll have to get a little into MSBuild, as you also suggest in your walk throughs!
I'll donate a little cash when I get back at work - it's really a great thing you're doing... and I should have looked into BTDF before... I can see that now.
Thanks again - if I can contribute in any way I'd be glad to help.
Regards,
Bo.
Coordinator
Jun 6, 2014 at 4:28 AM
Much appreciated Bo! I don't think there's any shortage of work to be done -- a new Visual Studio add-in for 2010+, dependency analyzer, built-in group-wide deployment automation, etc. If there's anything that you think is missing and would like to contribute, let me know.

Thanks!
Tom