0

I installed Paket for Visual Studio from

https://marketplace.visualstudio.com/items?itemName=SteffenForkmann.PaketforVisualStudio.

Then I created a new project (actually a solution) and checked immediately that a NuGet package called System.ValueTuple already was installed under NuGet. (I did not install this package). The package version was v4.4.0 but I could see that version v4.5.0 was already available.

After a bit of tampering I arrived at a condition where NuGet still had version v4.4.0 of System.ValueTuple while Paket was supposedly using v4.5.0. The details of how I did this are tedious and are at the bottom of this post.

Do I have to worry that NuGet and Paket are referencing different versions of the System.ValueTuple package?

Should I update that package in NuGet to version v4.5.0?

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Details of how I ended up with two different versions in NuGet and Paket:

I did Tools\Paket Dependencies Manager\Update All Packages, hoping to update the package. However, nothing happened. v4.4.0 was still the version installed in NuGet.

At this point my solution did not have a .paket folder, a paket.dependencies file or a paket.lock file.

So I went to the Solution Explorer and chose References\Add Package and added the Deedle package. I also added the System.Data package that is required by Deedle.

I checked again and the version of System.ValueTuple did not change in NuGet.

Once again I did Tools\Paket Dependencies Manager\Update All Packagesbut v4.4.0 was still the version installed in NuGet.

So I did References\Add Package and added System.ValueTuple to Paket. The package appeared in paket.dependencies but it still had v4.4.0 in NuGet. I opened the file paket.lock with an editor and searched for ValueTuple. I could see the following: System.ValueTuple (4.5) on line 482 and no other instances on other lines.

Soldalma
  • 4,636
  • 3
  • 25
  • 38
  • I don't think you should mix Paket and Nuget in the same solution, although I do it temporarily now and then just to fix this problem. I have noticed that updating System.ValueTuple via NuGet doesn't always work, so what I do is that I manually insert a reference to it in the project file, with the updated version number. Just copy the line that references FSharp.Core, and modify the name. Set both to 4.5.0. Another possibility is to convert the project to use Paket, and then add System.ValueTuple using Paket. – Bent Tranberg Jul 15 '18 at 09:15
  • @BentTranberg - I created a new solution and updated System.ValueTuple to v4.5.0. It still showed as a NuGet installed package. Then I copied paket.bootstrapper.exe to the root directory and ran it. A paket.exe file was created. On a command prompt I entered paket.exe convert-from-nuget. Then I looked again and there were no NuGet packages installed. 1) Did Paket uninstall System.ValueTuple (as a Nuget package)? (It still appears in the System.Explorer). 2) Is this what you mean by converting the project to use Paket? 3) Have I stopped mixing Paket and Nuget in the same solution? – Soldalma Jul 15 '18 at 11:07
  • I know too little to tell whether there's something wrong with that you're doing, but what I've done is update the version numbers of FSharp.Core and System.ValueTuple to 4.5.0 in the project file's PackageReference entries, any which way possible - using NuGet update when it worked, or manually if not. In both cases, only the project file was modified. Later when introducing Paket, those two entries still remain in the project file, so I assume they're ok. – Bent Tranberg Jul 15 '18 at 18:45
  • The "NuGet" node in the Solution Explorer doesn't mean you're not using Paket. I think your project uses Paket if it has a line in the project file that that says – Bent Tranberg Jul 15 '18 at 18:45

0 Answers0