1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

nugetパッケージのバージョンとdllのアセンブリバージョンは別物

1
Posted at

こんな知識が役に立つことはほぼ無いんですが……。

System.Memoryというnugetパッケージがあります。

主に.net FrameworkからSpanなどを扱う場合に必要になるパッケージです。.net Standard 2.0対応のパッケージをインストールした場合に依存で必要になる場合もあります。

メジャーな依存パッケージで、かつバージョンが複数あるため、nugetでいろんなパッケージを入れているとバージョン競合の警告が出る場合があります。
nugetの設定で新しいバージョンに固定して、バインドリダイレクトの設定をすればよいのですが……。
警告メッセージはアセンブリバージョンで表示されるのに、なぜかnugetを見ると該当のバージョンがない、という問題が発生します。

調べると、System.Memory などの一部のMicrosoftが提供しているパッケージはnugetのバージョンとアセンブリバージョンが違うらしいです。

nuget アセンブリ
4.5.0 4.0.1.0
4.5.1 4.0.1.0
4.5.2 4.0.1.0
4.5.3 4.0.1.1
4.5.4 4.0.1.1
4.5.5 4.0.1.2
4.6.0 4.0.2.0
4.6.2 4.0.4.0
4.6.3 4.0.5.0

よくわからないので備忘録として記事にしました。だれか理由を教えて下さい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?