kamsar / Dianoga

An automatic image optimizer for the Sitecore media library.
Other
102 stars 45 forks source link

Content folder is not copied if PackageReference is in use #103

Closed trnktms closed 2 years ago

trnktms commented 2 years ago

Version of Dianoga

5.4.1

Reproducible steps that cause the issue

  1. Use PackageReference to reference the Dianoga NuGet package
  2. Restore NuGet packages on the solution
  3. content folder is not copied from the NuGet package

What you expected to see, versus what you actually saw

Current behaviour

content folder is not copied from the NuGet package on NuGet restore

Expected behaviour

content folder is copied from the NuGet package on NuGet restore

Possible fix

Next to the content folder in the NuGet package, create another contentFiles folder with the same content in it - https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files.

markgibbons25 commented 2 years ago

The issue with contentFiles is that you can't opt out of it - all or nothing approach. If you have any example of any other sitecore module using it successfully let me know so I can investigate. The other issue is due to the large amount of .exe files, duplicating them in the package increases it a lot.