richardszalay / helix-publishing-pipeline

Unified publishing for Sitecore Helix solutions that extends existing Visual Studio and command line workflows
MIT License
68 stars 18 forks source link

SitecoreAssembliesToInclude directive does not work properly #77

Open slapikv opened 3 years ago

slapikv commented 3 years ago

We have a patch from Sitecore and want to apply it to our solution via SitecoreAssembliesToInclude directive in the Website.wpp.targets but as the result, in the bin, we see the non-hotfix dll from Nuget(packages referenced via project reference not packages.config). We also tried to add dll to the Project layer, where we do not have a NuGet package with that dll - the result is the same dll from NuGet is published(but project layer should be published the last). In addition, we tried https://github.com/richardszalay/helix-publishing-pipeline#extensibility for both profile and project name but with no success.

paulgeorge commented 3 years ago

@slapikv I was seeing the same behaviour until I moved the SitecoreAssembliesToInclude into it's own <ItemGroup> when I did that and rebuilt the included files were then output into the deploy folder as expected.

slapikv commented 2 years ago

As a workaround for this issue, we have utilized a post-build event script in the WebRoot project. Here is the code example:

 REM important! always check Azure publishing after changing this!
 REM publish it to project bin
 xcopy /Y /I "$(ProjectDir)..\..\SitecoreSupport\bin\*" "$(OutDir)\.."

 REM publish it to IntermediateOutputPath during build, temporary fix for exceeded path length
 REM note: this path is used as IntermediateOutputPath in this project .csproj file
 xcopy /Y /I "$(ProjectDir)..\..\SitecoreSupport\bin\*" "C:\[YourProjectFolder]\bld\Package\PackageTmp\bin"

 REM publish it to Docker folder to support Azure DevOps CI/CD
 xcopy /Y /I "$(ProjectDir)..\..\SitecoreSupport\bin\*" "$(ProjectDir)\..\..\..\docker\deploy\website\bin"