2017-11-20 12 views
0

いくつかのコードを.NET CORE 2.0に変換しようとしていますが、nugetのリストア中に、NU1701の警告が表示され、 .NET461を使用します。面白いことに、私はこれらのパッケージを参照していません。どのNレベルの依存関係がこれらのパッケージを実際に参照しているかをどのように調べることができますか?どのパッケージがナゲットパッケージを参照しているのかを調べる

これは古代版のパッケージでもありますので、間違いなくサードパーティの依存関係です。私はパッケージのこれらのバージョンを決して参照しません。どのように依存関係がどこから生じるのかを知る上でのヒント?

例:

NU1701: Package 'Microsoft.AspNet.WebApi.Client 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.AspNet.WebApi.Core 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.AspNet.WebApi.Client 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.AspNet.WebApi.Core 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.AspNet.WebApi.WebHost 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.AspNet.WebApi.WebHost 4.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.Net.Http 2.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.Net.Http 2.0.20710' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.Web.Infrastructure 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Microsoft.Web.Infrastructure 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Swashbuckle.Core 5.6.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'Swashbuckle.Core 5.6.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'WebActivatorEx 2.0.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
NU1701: Package 'WebActivatorEx 2.0.0' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems. 
+0

https://stackoverflow.com/questions/44944172/net-core-dependency-tree/44944566#44944566でリストの依存関係を表示するためのmsbuildターゲットを投稿しました。おそらくそれらのうちの2番目のものが役に立ちます –

+2

あなたが直接「Swashbuckle」を参照していることを確信しています.netコア(asp.netコアには別のswashbuckleパッケージがあります) –

+0

あなたは正しいです。 Swashbuckleは詳細の悪魔でした(私の答えは下記参照)。 Swashbuckle.AspNetCoreに切り替えました。 :) –

答えて

1

解決策を見つけた:

  1. パイプログからのログ
  2. 選択文字列project.assets.jsonに復元nuget。
  3. project.assets.jsonのそれぞれにSelect-String Microsoft.AspNet.WebApi.Coreを実行してください。
  4. 対応するエディターをエディターで開きます。どのような依存関係が依存するのかを確認する

私の場合は、.NETフルフレームワーク版のSwashbuckleでした。 Swachbuckle.AspNetCoreに切り替え、依存関係が消えた。

関連する問題