- NuGet 5.1 support
- Support partial installs into multi-target framework projects
- Fixed no network error displayed in Add Packages dialog
- Fixed restoring too many projects when target framework changed
- Fixed adding non-sdk style project triggering NuGet restore multiple times
- Fixed restore menu incorrectly disabled
NuGet 5.1 support
NuGet 184.108.40.20613 is now included with Visual Studio for Mac 8.2.
Support partial installs into multi-target framework projects
A NuGet package being installed into a multi-target framework project may not support all frameworks. When this happens the PackageReference will now be added with a condition so the NuGet package is not used for frameworks that are not supported.
1 2 3 4 5 6 7 8 9 10
Fixed no network error displayed in Add Packages dialog
Networking errors were not being reported in the Add Packages dialog resulting in no information being available explaining why there were no search results.
Visual Studio for Mac uses Xamarin.Mac’s NSUrlSessionHandler for HTTP requests and the NSUrlSessionHandler reports errors using curly braces. For example:
This text was then being passed to string.Format in the Add Packages dialog and was causing a FormatException. The error would then not be displayed in the Add Packages dialog. The text now has the curly braces escaped to prevent the FormatException.
Fixed restoring too many projects when target framework changed
When the target framework was changed in a SDK style project all SDK style projects in the solution were restored. Now only the project and projects that depend on it are restored.
Fixed adding non-sdk style project triggering NuGet restore multiple times
Adding a new non-sdk style project to a solution could cause a NuGet restore to run multiple times.
The problem was that the SDK style projects, such as those that target Xamarin.Mac, may change their target framework on re-evaluation. This was causing Visual Studio for Mac to run a restore for all SDK style projects in the solution, multiple times. To avoid this the target framework changes during re-evaluation are ignored.
Fixed restore menu incorrectly disabled
In the Solution window on right clicking a solution, or the packages folder, the restore menu was incorrectly disabled when an SDK style project targeted .NET Framework or when the project had its RestoreProjectStyle set to PackageReference and had no PackageReferences.