Latch
NuGet package project references
Imagine this is your BasePlugin project (that gets built into a nuget package). It has a reference to Newtonsoft.Json:
Now, if you had a consumer that is using that package, that would also be able to use the Newtonsoft.Json package, because it's a transitive dependency.
3 replies
NuGet package project references
When you create a NuGet package from your project, it should automatically include information about its dependencies. This means that when another project uses your NuGet package, it should also have access to the types from your package's dependencies. For example, if your 'BasePlugin' package uses Newtonsoft.Json, projects that reference 'BasePlugin' should be able to use Newtonsoft.Json classes too. This happens because NuGet handles what's called "transitive dependencies" - it brings in not just your package, but also the packages your package depends on. If this isn't working as expected, it's worth checking your project file and NuGet package settings to ensure all dependencies are correctly specified and included.
3 replies