Bug 47689 - [workbooks] NuGet error: package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.7.0'
Summary: [workbooks] NuGet error: package requires NuGet client version '2.12' or abov...
Status: RESOLVED DUPLICATE of bug 47690
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Actually Unsure ()
Version: 1.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: xamarininteractive
URL:
Depends on:
Blocks:
 
Reported: 2016-11-23 05:27 UTC by CraigD
Modified: 2016-11-29 18:45 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 47690

Description CraigD 2016-11-23 05:27:00 UTC
STEPS
-----

1. Add NuGet package Microsoft.CodeAnalysis.CSharp
2. This pulls in Microsoft.CodeAnalysis.Common which has a whole LOT of dependencies [see](https://www.nuget.org/packages/Microsoft.CodeAnalysis.Common/)
3. All these dependencies are included in the YAML header [see](https://github.com/xamarin/Workbooks/blob/71120728406a5a05667e9dae85792f617b827269/csharp/roslyn/roslyn-syntax-trees.workbook/index.workbook#L5-L89)
4. The workbook runs fine in this first session when the Nuget was added.
5. Subsequently opening the Workbook fails on Package Restore - error "The 'System.Text.Encoding.CodePages 4.3.0' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.7.0'"


LOG
---
[Info][00:00:10.8669960] MessageViewController (LogMessage): PushMessage => Status: Restoring packages… @ /Users/builder/data/lanes/904/1f3067d3/source/inspector/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:98
[Error][00:00:16.7410970] MessageViewController (LogMessage): PushMessage => Alert: The 'System.Text.Encoding.CodePages 4.3.0' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.7.0'. @ /Users/builder/data/lanes/904/1f3067d3/source/inspector/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:98


WORKAROUND
----------
If you manually delete all the dependencies from the YAML [see](https://github.com/xamarin/Workbooks/commit/54a3b4828b04eaa82d2b1fdf8fbf8b66ad56cd78) leaving ONLY 
```
 packages:
 - id: Microsoft.CodeAnalysis.CSharp
    version: 1.3.2
```
then the workbook opens, restores packages, and runs successfully every time. But when all the dependencies are included in the YAML, it fails with the error shown above.

The workbook that loads successfully is [here](https://github.com/xamarin/Workbooks/tree/master/csharp/roslyn/roslyn-syntax-trees.workbook).
Comment 1 Rajneesh Kumar 2016-11-29 18:45:36 UTC

*** This bug has been marked as a duplicate of bug 47690 ***