Visual Studio 2017 迁移 packages.config 到 PackageReference

Visual Studio 2017 Migrating packages.config to PackageReference

将带有 Newtonsoft.Json 包的 packages.config 迁移到 PackageReference csproj 格式时出现兼容性问题:

Newtonsoft.Json v10.0.3, install.ps1 script will be ignored when the package is installed after the migration.

这是什么东西会破坏东西吗?该项目在本地 VS 2017 中编译良好。但是 TeamCity Visual Studio (sln) 构建失败并出现错误 namespace name Newtonsoft could not be found。这是否与迁移问题有关?

根据@Peska 的评论,我检查了用于 TeamCity 中的还原构建步骤的 NuGet 版本。使用的 NuGet 版本是 3.4.3。

将其更改为 Nuget 4.3.0 后,程序包恢复按预期工作,随后 "Build Solution (sln)" 步骤成功。