In my solution, I have two Class Library projects targeting .NET 5. When I install the NuGet package Microsoft.Azure.Management.DataFactory to both projects, they install separate dependency versions for that package.
For example, Project A will install the following:
- Microsoft.Rest.ClientRuntime (2.3.20)
- Microsoft.Rest.ClientRuntime.Azure (3.3.19)
- Newtonsoft.Json (13.0.1)
- System.Net.Http (4.3.4)
Project B will install the following:
- Microsoft.Rest.ClientRuntime (2.3.20)
- Microsoft.Rest.ClientRuntime.Azure (3.3.19)
- Newtonsoft.Json (13.0.1)
- System.Net.Http (4.3.0)
Both Projects are targeting net5.0. Why does Project A install version 4.3.4 of System.Net.Http while Project B installs version 4.3.0? Is there some way to control which version of these dependencies gets installed? I would like for 4.3.4 to be installed to both Projects since it resolves a vulnerability in the package.