1

The project uses Helix publishing and all the Sitecore dlls are excluded, in the publishing targets file.

  <ItemGroup>        
    <SitecoreAssembliesToExclude Include="@(SitecoreAssemblies)" />        
  </ItemGroup>

  <ItemGroup>
    <ExcludeFromPackageFiles Include="bin\Sitecore.*.dll" />
    <ExcludeFromPackageFiles Include="bin\*.dll.config" />
    <ExcludeFromPackageFiles Include="bin\*.pdb" />
    <ExcludeFromPackageFiles Include="bin\Scriban.dll;bin\Spatial4n.Core.dll;bin\Newtonsoft.Json.Bson.dll;bin\Microsoft.OData.Client.dll;bin\AjaxMin.dll;bin\Microsoft.Extensions.Caching.StackExchangeRedis.dll" />
    <ExcludeFromPackageFolders Include="bin\de" />
  </ItemGroup>
  <PropertyGroup>

But I want to include this dll - Sitecore.Commerce.ServiceProxy

How to do that

1
  • Have you considered putting this dll as a package in release pipeline? Commented Aug 26, 2021 at 8:06

2 Answers 2

2

There is an attribute Exclude that should works for you. You can add Exclude="Sitecore.Commerce.ServiceProxy.dll" to the corresponding ExcludeFromPackageFiles node.

  <ItemGroup>        
    <SitecoreAssembliesToExclude Include="@(SitecoreAssemblies)" />        
  </ItemGroup>

  <ItemGroup>
    <ExcludeFromPackageFiles Include="bin\Sitecore.*.dll" Exclude="Sitecore.Commerce.ServiceProxy.dll" />
    <ExcludeFromPackageFiles Include="bin\*.dll.config" />
    <ExcludeFromPackageFiles Include="bin\*.pdb" />
    <ExcludeFromPackageFiles Include="bin\Scriban.dll;bin\Spatial4n.Core.dll;bin\Newtonsoft.Json.Bson.dll;bin\Microsoft.OData.Client.dll;bin\AjaxMin.dll;bin\Microsoft.Extensions.Caching.StackExchangeRedis.dll" />
    <ExcludeFromPackageFolders Include="bin\de" />
  </ItemGroup>
  <PropertyGroup>
1
  • I tried Exclude="Sitecore.Commerce.ServiceProxy.dll" & Exclude="bin\Sitecore.Commerce.ServiceProxy.dll". No luck.
    – sukesh
    Commented Aug 24, 2021 at 7:24
1

You can create a CSV file and mentioned all the DLL into that file like below:

enter image description here

I have created one folder named AssemblyLists and put the CSV files under this and mentioned all the DLL which I want to exclude.

After that write the below code into the publishing targets file i.e. Deploy.wpp.targets:

<ItemGroup>
        <!-- Exclude Sitecore Assemblies -->
        <SitecoreAssemblyListsToExclude Include="AssemblyLists\*.csv" />

        <ExcludeFromPackageFiles Include="bin\Sitecore.*.dll" />
        <ExcludeFromPackageFiles Include="bin\*.dll.config" />
        <ExcludeFromPackageFiles Include="bin\*.pdb" />
        <ExcludeFromPackageFiles Include="bin\Scriban.dll;bin\Spatial4n.Core.dll;bin\Newtonsoft.Json.Bson.dll;bin\Microsoft.OData.Client.dll;bin\AjaxMin.dll;bin\Microsoft.Extensions.Caching.StackExchangeRedis.dll" />
        <ExcludeFromPackageFolders Include="bin\de" />

</ItemGroup>    

Here I have used SitecoreAssemblyListsToExclude instead of SitecoreAssembliesToExclude.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.