Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install different versions of nuget packages inside one solution file with two projects

I have two .csproj projects named A and B under one solution file (.sln), I need to install a custom nuget package of version 1.0 in A and 2,0 in B. Is that possible? I have tried to install-package but it updates the solution. Both of them are now updated to 2.0.

like image 555
codingninja Avatar asked Feb 03 '26 20:02

codingninja


1 Answers

You can do it using the console instead the manager window,

PM> Install-Package Newtonsoft.Json -Version 6.0.8 

in the other project

PM> Install-Package Newtonsoft.Json -Version 5.0.3 
like image 143
Juan Pablo Garcia Coello Avatar answered Feb 06 '26 09:02

Juan Pablo Garcia Coello



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!