0

I updated Visual Studio Community to Version 15.2, 26430.14 release and I can no longer install packages using Paket. When I right-click on References and then click on Add Package I get the following message in the Error List window:

The type initializer for System.Reactive.Linq.Observable threw an exception

Any suggestions on how to fix this?

Soldalma
  • 4,636
  • 3
  • 25
  • 38
  • 3
    Do you mean NuGet or are you using a Paket plugin for VS? – Foole Jun 24 '17 at 20:43
  • 1
    @Foole - I installed Paket from – Soldalma Jun 25 '17 at 18:44
  • 1
    This seems a pretty good description of the problem. Not sure why is there a down and close vote. I tried it and it works. TBH, I've never used this functionality of the paket add-in. I would just uninstall and reinstall the add-in. In the meantime u can still install packages using nuget itself, or just add the package to the paket.dependencies (in the solution root) and paket.references (in the project root). Then run paket install from the command-line. You can add these two files to the Project Explorer in VS. – s952163 Jun 25 '17 at 23:12
  • 1
    @s952163 - Thanks for your kind comment. I tried to uninstall and reinstall the add-in and that did not work. Editing paket.dependencies and paket.references seemed risky to me. So I reinstalled the whole Visual Studio 2017. Paket works fine now. – Soldalma Jun 27 '17 at 11:52
  • glad it worked! editing paket.dependencies and paket.references is absolutely fine. You can add those files to the VS solution. In fact, if u just run paket from the CLI then u *need* to edit them. I still do even though i use the paket add-in. For example specifying redirects, or restricting the framework (so you donT end up downloading the whole interweb in .net core) can be done by editing those files. – s952163 Jun 28 '17 at 00:47
  • 1
    @s952163 - The problems with Paket started again as I tried to install Logary. I struggled, reinstalled VS 2017 twice, and finally gave up and switched back to Nuget, which gives me clear messages about incompatibility. I am not a professional programmer and the whole subject of compilation/dependencies/make is a bit of a mystery to me and the idea of editing the three Paket files scares me. Suggestions of what to read on the subject would be most welcome. – Soldalma Jun 28 '17 at 01:25
  • could be something strange with the add-in or with VS2017 as u suggest. However it's not a pre-requisite, you can just use nuget as you say. You can take a look at [Paket docs here](https://fsprojects.github.io/Paket/). If u think the issue is serious maybe report in the [Paket Repo](https://github.com/fsprojects/Paket/issues). – s952163 Jun 28 '17 at 02:56
  • @s952163 - I think the issue is not with VS or Paket. The issue is my ignorance of the subject. Paket is terrific but I just cannot figure out how to use it. Their docs are too advanced for me. – Soldalma Jun 28 '17 at 03:45
  • you can always drop by the [F# Slack](http://foundation.fsharp.org/join) or the chatroom [here](https://chat.stackoverflow.com/rooms/51909/f). :^) – s952163 Jun 28 '17 at 04:07

0 Answers0