How do you know which dependencies must be added to a nuspec file when publishing a nuget?

51 Views Asked by At

In my company we have many many repositories, and in the nuspec files, sometimes I see some dependencies added, sometimes not. For example, some projects have

<dependency id="Newtonsoft.Json" version="13.0.3" />

But some others don't, while both projects use Newtonsoft.Json! I'm kinda afraid to add or remove stuff from here since I don't understand enough what dependencies have to be added and what dependencies don't.

I am not asking what dependencies my projects needs. I am asking when do we have to add a dependency to the nuspec, and when we don't need to add it.

Also, I need to be compatible with older versions of the framework, so I'm afraid I still have to maintain nuspec files and can't rely only on dotnet pack

Can someone enlighten me?

0

There are 0 best solutions below