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? Aug 26 at 8:06
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.
    – Qwerty
    Aug 24 at 7:24
0

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, privacy policy and cookie policy

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