The Visual Studio 2017 provides an option to change Package Management in NuGet Package Manger settings. This option available from Visual Studio 2017. Please change the NuGet Package option in Default Package Management format dropdown. Select packages.config instead of the Package Reference,please refer to the following screenshot.
After changing the setting, it will install properly.
Did you find this information helpful?
Help us improve!
Correct inaccurate or outdated content
Improve illustrations or images
Fix typos or broken links/images
Add more information
Correct inaccurate or outdated code samples