kamsar / Dianoga

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

Dianoga is not correctly setup when NuGet-package is restored #33

Closed jsommr closed 6 years ago

jsommr commented 6 years ago

When installing for the first time, all files are copied correctly (App_Data/App_Config) but when someone else clones our project and restores the NuGet package, the files are not copied.

Can be reproduced by creating a new project with the following packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Dianoga" version="3.1.1" targetFramework="net461" />
  <package id="nQuant" version="1.0.3" targetFramework="net461" />
</packages>

If you restore the packages, no files are added to the project.

kamsar commented 6 years ago

The act of installing is what adds the files to the csproj; restoring just adds the package to the packages folder it doesn't reference anything.

With .net core it works differently in that the package reference is enough by itself, perhaps that's the source of the confusion?

On Wed, Mar 7, 2018 at 5:48 AM -0800, "Jan Sommer" notifications@github.com wrote:

When installing for the first time, all files are copied correctly (App_Data/App_Config) but when someone else clones our project and restores the NuGet package, the files are not copied.

Can be reproduced by creating a new project with the following packages.config: <?xml version="1.0" encoding="utf-8"?>

If you restore the packages, no files are added to the project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jsommr commented 6 years ago

Ah, NuGet keeps surprising: https://github.com/NuGet/Home/issues/1417

Your code is as always exactly how it's supposed to be. Sorry for the inconvenience.