PackageReference usage for Synthesis NuGet causes incorrect deployment for config files.
rroman81 opened this issue · 1 comments
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Using PackageReference for Synthesis v9.1.0.2 in .Net 4.8 Web Project causes the files under contentFiles/any/any/Synthesis..config to be deployed to obj/debug/PackageTmp/ root instead of App_Config/Include/Synthesis sub-folder.
If the current behavior is a bug, please provide the steps to reproduce.
Web Project templates utilizes PackageReferences for NuGet dependencies. Added Synthesis v9.1.0.2 to through Package Manager UI.
What is the expected behavior?
NuGet definition should be outputing the files into correct deployment folder structure under App_Config.
Please mention your Sitecore version and Synthesis version.
I am using Sitecore 9.2 with Synthesis 9.1.0.2
This is a known limitation of PackageReference
on Web projects. contentFiles
just flat out aren't supported for some reason.
https://devblogs.microsoft.com/nuget/nuget-contentFiles-demystified/ (see "Supported Project Types")
The NuGet package is in the correct format according to NuGet specifications, and it should work perfectly fine in a class library project.
My recommendation is to either:
- Install it onto a class library project
- Explicitly add the config files from the package to your solution in
App_Config/Modules/Synthesis
#2 is what I do on my projects. Microsoft doesn't appear to be treating it as a bug and I don't think there are plans to fix it.