在 csproj 第一个 <PropertyGroup> 里加:
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>