daveaglick / Scripty

Tools to let you use Roslyn-powered C# scripts for code generation
MIT License
620 stars 69 forks source link

JSON.NET - non-dev package reference #96

Closed aarondandy closed 7 years ago

aarondandy commented 7 years ago

I added a recent Scripty.MSBuild 0.7.3 to a project and it also ended up taking a non-dev dependency on JSON.NET <package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" /> . I forget how all this works but maybe it needs to be marked as developmentDependency="true" in the nuspec somehow?

daveaglick commented 7 years ago

Maybe...though on second I'm actually not sure it should be a development dependency. The MSBuild task does use Json.NET to encode and pass date to the Scripty CLI application so it does need the library locally. It's not a good look for that to get pulled into the whole project though, especially if it results in conflicts.

I'm thinking there's a couple options here:

daveaglick commented 7 years ago

I've confirmed that marking Json.NET as a developmentDependency removes the package dependency but continues to pack the assembly directly. This change will go out with the next release.