NuGet エラー NU1008
Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: PackageId.
問題点
中心的なパッケージ管理を使用する場合は、バージョンを PackageVersion 項目で定義する必要があります。
使用しているプロジェクト ファイルには、次の情報が記載されている場合があります。
<!-- In the project file. -->
<PackageReference Include="PackageId" Version="5.1.0" />
解決策
- PackageId PackageReference からバージョンを削除します。
- 場合によっては、Directory.Packages.props にある PackageId の PackageVersion 項目を追加または更新する必要があります
例:
<!-- In the project file. -->
<PackageReference Include="PackageId" />
<!-- In the Directory.Packages.props -->
<PackageVersion Include="PackageId" Version="5.1.0" />
Note
メタデータの IncludeAssets, PrivateAssets などは、PackageReference アイテム上に維持する必要があることに注意してください。
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示