2

My library (NetMQ) have a dependency on JetBrains.Annotations, however I want it to be only a dev dependency and don't want it to appear on the nuspec file generated with "dotnet pack".

How can I set a dependency a dev dependency with project.json?

somdoron
  • 4,653
  • 2
  • 16
  • 24

1 Answers1

5

it seems setting the type of the dependency to build does the trick, like so:

"dependencies": {
    "JetBrains.Annotations": {
      "version": "10.1.5",
      "type"   : "build"
    }
}
somdoron
  • 4,653
  • 2
  • 16
  • 24