BTDF deployment - external dll include in custom Pipeline component

I have an external .dll that I want to refer in my custom pipeline component, if I refer in my .cs proj and when I build it is generating 2 .dll in bin folder.

And when I refer this .cs proj in my Pipeline proj and run a build it always throwing error 'the process is being used by another process already'.

What am I doing wrong ? How can I correct this ?

in BTDF file, I am doing as below :

 <PipelineComponents Include="$(ProjectName).dll">
      <LocationPath>..\ProjName\bin\$(Configuration)</LocationPath>
    </PipelineComponents>

July 20th, 2015 12:26pm

Hi,

Set <IncludePipelineComponents> to true and add an ItemGroup (like Schemas) named PipelineComponents.  Hopefully you added the pipeline component to a separate assembly from the rest of your artifacts.

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 12:46pm

I have a separate .dll that I am referring named 'Ionic.zip' for me to include in my .cs proj. But when I am building, it is creating 2 dll (Ionic.zip.dll and project.dll) in bin folder.

And when I am referring this , in my Pipeline project, as mentioned earlier ''the process is being used by another process already'. what I am doing wrong here ? How should I refer the external dll ?

July 20th, 2015 12:56pm

Hi Jag,

If your solution includes  projects with source code for .NET helper assemblies example Ionic.zip DLL, then put them under a ItemGroup Components.  If .NET assemblies that do not have projects with source code and they need to be installed in the GAC, then put them under ExternalAssemblies.

Assemblies containing custom .NET components

The Components ItemGroup is appropriate for any assembly that contains custom .NETcomponents (classes).  The assembly must contain only .NET artifacts.

<ItemGroup>

  <Components Include="MyComponents.dll">

    <LocationPath>..\$(ProjectName).Components\bin\$(Configuration)</LocationPath>

  </Components>

</ItemGroup>

Include attribute: DLL file name

Regards,

Sharad

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 1:04pm

HI,

Use Item group to add external assembly in BTDF like below

<ItemGroup>
    <ExternalAssemblies Include="Assembly1.dll">
        <LocationPath>..PathToAssembly</LocationPath>
    </ExternalAssemblies>
    <ExternalAssemblies Include="OtherAssembly.dll">
        <LocationPath>C:SharedAssemblies</LocationPath>
    </ExternalAssemblies>
</ItemGroup>

Thanks

Abhishek

July 20th, 2015 1:19pm

do I need to place this 'Ionic.Zip.dll' and particular location ? or I can place that anywhere inside my project folder and refer that dll in my .cs proj to zip file ?

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 1:37pm

Place Ionic.zip dll in a folder and then refer it from the same folder (I don't think it much depends on the location from where you refer it).

<ItemGroup>
   
<ExternalAssemblies Include="Ionic.zip">
       
<LocationPath>..\Libraries</LocationPath>
   
</ExternalAssemblies></ItemGroup>

Here Libraries folder contains your Ioniz.zip file and you can refer the Ioniz.zip from this folder to your cs project.

Regards,

Sharad

July 20th, 2015 2:07pm

when I build the solution, I am getting following error ? 'ZipEncoder.dll ' is my .cs project build dll

Error	118	Unable to copy file "obj\Debug\ZipEncoder.dll" to "bin\Debug\ZipEncoder.dll". The process cannot access the file 'bin\Debug\ZipEncoder.dll' because it is being used by another process.	

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 2:15pm

Can you do the above process for ZipEncoder.dll as well now this one is missing.

Regards,

Sharad

July 20th, 2015 2:36pm

this is what I am doing, it is not taking 'ZipEncoder.dll' in GAC though during deployment ?
<ItemGroup>
    <ExternalAssemblies Include="Ionic.Zip.dll">
      <LocationPath>..\$(ProjectName)</LocationPath>
    </ExternalAssemblies>
    
    <PipelineComponents Include="ZipEncoder.dll">
      <LocationPath>..\$(ProjectName)\bin\$(Configuration)</LocationPath>
    </PipelineComponents>
  </ItemGroup>

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 2:47pm

This is correct location for ZipEncoder.dll can you please verify this??

It is not taking this path. Try loading it from the same folder from which you are loading and able to GAC Ionic.zip Dll.

Regards,

Sharad


July 20th, 2015 3:05pm

I see ZipEncoder.dll is in GAC but Ionic.Zip.dll is not present. May be that is the reason its failing.

Why my External assembly is not picking ?

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 3:09pm

If you go to the pipeline designer and choose the Add Item function in the Toolbox, it should automatically show up under the BizTalk Pipeline Components tab once the DLL is present in the BizTalk PipelineComponents folder.  So you would just deploy once, then create your pipeline.

Now, due to Visual Studio's big issues with DLL locking, there is never a great way to work with references in the pipeline designer.  I sometimes add a project reference to my PipelineComponents project, sometimes let the Add Item dialog add a reference to BizTalk's PipelineComponents folder.  Either way, you will probably run into at least some issues with that DLL being locked by Visual Studio.  Particularly whenever you have opened the pipeline designer.

Regards,

Sharad

July 20th, 2015 3:14pm

Are you sure you are following this steps carefully

1. Set the IncludePipelineComponents property to true

The property may be included in any PropertyGroup, but is commonly placed in the first PropertyGroup in the project file.


<PropertyGroup>

 ...

 <IncludePipelineComponents>true</IncludePipelineComponents>

 ...

</PropertyGroup>


2. Add a PipelineComponents ItemGroup


<ItemGroup>

 <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">

   <LocationPath>..\PipelineComponents\bin\$(Configuration)</LocationPath>

 </PipelineComponents>

</ItemGroup>


The following is the default configuration, This default is in effect if you do not include any PipelineComponents elements in your project file.


<ItemGroup>

 <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">

   <LocationPath>..\$(ProjectName).PipelineComponents\bin\$(Configuration)</LocationPath>

 </PipelineComponents>

</ItemGroup>


Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 3:18pm

 <ItemGroup>
    <ExternalAssemblies Include="Ionic.Zip.dll">
      <LocationPath>..\$(ProjectName)\</LocationPath>
    </ExternalAssemblies>
    
    <Schemas Include="ZipEncoder.dll">
      <LocationPath>..\$(ProjectName)\bin\$(Configuration)</LocationPath>
    </Schemas>
  </ItemGroup>

I did the same, have also added external assembly too...the original dll's are getting GAC'd but the external assembly does not ??
July 20th, 2015 3:25pm

Can you share your BTDF file?
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 3:40pm

For you .net component can you try this;

The Components ItemGroup is appropriate for any assembly that contains custom .NET components (classes).  The assembly must contain only .NET artifacts.


<ItemGroup>

 <Components Include="MyComponents.dll">

   <LocationPath>..\$(ProjectName).Components\bin\$(Configuration)</LocationPath>

 </Components>

</ItemGroup>


Include attribute: DLL file name

July 20th, 2015 3:42pm

what is your email address ?
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 3:44pm

The error you are facing is mainly related to visual studio not BTDF one, from the project properties I renamed your DLL name same as your project name and when I try to build it is never throwing the error you are facing.

Rest of the corrections for your BTDF file send you on email.

Regards,

Sharad

July 20th, 2015 4:20pm

can you rebuild, build the complete solution ?

are all 3 dll's being GAC'ed ?

I did not receive any email  b

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 4:22pm

Yes I am able to build and rebuild the complete solution multiple times. :)
July 20th, 2015 4:24pm

Now I am getting new error

Object reference not set to an instance of an object ?

Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 4:27pm

I closed complete Visual Studio and opened the solution again, receiving following error on build

Assembly "C:\Users\AppData\Local\Temp\3\BT\PID27380\BizTalkAssembly\945e6cd1447b3648ee71c97db46042f5\ZipEncoder.dll" does not appear to be a BizTalk assembly, and cannot be deployed to the Configuration database. If this assembly is referenced by other BizTalk assemblies, it needs to be installed into the global assembly cache (GAC) of each BizTalk server.

July 20th, 2015 5:26pm

This is correct location for ZipEncoder.dll can you please verify this??

It is not taking this path. Try loading it from the same folder from which you are loading and able to GAC Ionic.zip Dll.

Regards,

Sharad


  • Edited by SharadVerma Monday, July 20, 2015 7:03 PM better
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 7:02pm

This is correct location for ZipEncoder.dll can you please verify this??

It is not taking this path. Try loading it from the same folder from which you are loading and able to GAC Ionic.zip Dll.

Regards,

Sharad


  • Edited by SharadVerma Monday, July 20, 2015 7:03 PM better
July 20th, 2015 7:02pm

Are you sure you are following this steps carefully

1. Set the IncludePipelineComponents property to true

The property may be included in any PropertyGroup, but is commonly placed in the first PropertyGroup in the project file.


<PropertyGroup>

 ...

 <IncludePipelineComponents>true</IncludePipelineComponents>

 ...

</PropertyGroup>


2. Add a PipelineComponents ItemGroup


<ItemGroup>

 <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">

   <LocationPath>..\PipelineComponents\bin\$(Configuration)</LocationPath>

 </PipelineComponents>

</ItemGroup>


The following is the default configuration, This default is in effect if you do not include any PipelineComponents elements in your project file.


<ItemGroup>

 <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">

   <LocationPath>..\$(ProjectName).PipelineComponents\bin\$(Configuration)</LocationPath>

 </PipelineComponents>

</ItemGroup>


  • Edited by SharadVerma Monday, July 20, 2015 7:16 PM better
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2015 7:16pm

Are you sure you are following this steps carefully

1. Set the IncludePipelineComponents property to true

The property may be included in any PropertyGroup, but is commonly placed in the first PropertyGroup in the project file.


<PropertyGroup>

 ...

 <IncludePipelineComponents>true</IncludePipelineComponents>

 ...

</PropertyGroup>


2. Add a PipelineComponents ItemGroup


<ItemGroup>

 <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">

   <LocationPath>..\PipelineComponents\bin\$(Configuration)</LocationPath>

 </PipelineComponents>

</ItemGroup>


The following is the default configuration, This default is in effect if you do not include any PipelineComponents elements in your project file.


<ItemGroup>

 <PipelineComponents Include="$(ProjectName).PipelineComponents.dll">

   <LocationPath>..\$(ProjectName).PipelineComponents\bin\$(Configuration)</LocationPath>

 </PipelineComponents>

</ItemGroup>


  • Edited by SharadVerma Monday, July 20, 2015 7:16 PM better
July 20th, 2015 7:16pm

Hi ,

Please confirm ZipEncoder is external assembly or schema dll .?

If your BTDF code you have incuded ZipEncoder as schema assembly,.

It should be like below

<ItemGroup>
    <ExternalAssemblies Include="Ionic.Zip.dll">
      <LocationPath>..\$(ProjectName)\</LocationPath>
    </ExternalAssemblies>
    
   <ExternalAssemblies Include="ZipEncoder.dll">
      <LocationPath>..\$(ProjectName)\bin\$(Configuration)</LocationPath>
    </ExternalAssemblies>
  </ItemGroup>

Also verify the relative path and it should point to correct folder location where assembly exists .

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 12:11am

Hi Abhishek, can you send me your email address, I will send you my solution in zip, you can take a look and see where exactly I am doing wrong and why it is not building ?
July 21st, 2015 12:24am

I see that for some reason the code is getting locked in my VS2013. I can build the project, but when I rebuild it is saying : Unable to delete file '...\ZipEncoder.dll '. Access to the path 'C:\...\bin\Debug\ZipEncoder.dll' is denied.

How can I fix this ?

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 10:12am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics