Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Relates to sample https://github.com/xamarin/Workbooks/tree/master/csharp/roslyn/roslyn-syntax-trees.workbook
0. When this sample (above) was first created...
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 '188.8.131.52'"
[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 '184.108.40.206'. @ /Users/builder/data/lanes/904/1f3067d3/source/inspector/Clients/Xamarin.Interactive.Client/Messages/MessageViewController.cs:98
If you manually delete all the dependencies from the YAML [see](https://github.com/xamarin/Workbooks/commit/54a3b4828b04eaa82d2b1fdf8fbf8b66ad56cd78) leaving ONLY
- id: Microsoft.CodeAnalysis.CSharp
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).
Created attachment 18606 [details]
Workbook that exhibits NuGet error
Workbooks Version 220.127.116.11 (master/1f3067d)
Created attachment 18607 [details]
Workbook that succesfully runs
Additionally: it would be nice if workbooks only listed the NuGet packages that have been added explicitly, and not the very very long list of nuget packages that results from adding this one package.
Another observation: if you open the "Workbook that successfully runs attachment 18607 [details]) and then save it on _Mac_ (El Cap), the YAML becomes:
- id: System.Collections.Immutable
- id: System.Reflection.Metadata
- id: Microsoft.CodeAnalysis.Common
- id: Microsoft.CodeAnalysis.CSharp
...and not the complete/full list of 20+ dependencies that were added when `Microsoft.CodeAnalysis.CSharp` was referenced on Windows, so I think this is a Mac/Windows difference. On Windows if I save it, the full list is re-added to the YAML and it re-opens without error.
SO - addendum to the original report:
* NuGet behavior is different on Mac and Windows! Mac pulls in 4 dependencies, Windows pulls in 20
*** Bug 47689 has been marked as a duplicate of this bug. ***
This is fixed in master and will be available in Workbooks 1.3.
> Additionally: it would be nice if workbooks only listed the NuGet packages that have been added explicitly, and not the very very long list of nuget packages that results from adding this one package.
This is also fixed. :-)