Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON.NET - non-dev package reference #96

Closed
aarondandy opened this issue Apr 24, 2017 · 2 comments
Closed

JSON.NET - non-dev package reference #96

aarondandy opened this issue Apr 24, 2017 · 2 comments

Comments

@aarondandy
Copy link

aarondandy commented Apr 24, 2017

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
Copy link
Owner

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:

  • ILMerge Json.NET (bleh)
  • Distribute the Json.NET libraries in the package without taking a dependency and then make sure the task can find them
  • Use a different source-only JSON encoder

@daveaglick
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants