黄色警告三角形对Visual Studio 2017中的依赖关系意味着什么? [英] What do Yellow Warning Triangles mean on Dependencies in Visual Studio 2017?

查看:424
本文介绍了黄色警告三角形对Visual Studio 2017中的依赖关系意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将PCL库转换为新的.Net Standard库,并且在依存关系上有一些黄色警告三角形,如下所示:

I have just converted my PCL library to a new .Net Standard library and I have some Yellow Warning triangles on my Dependencies shown below:

在转换过程中,它会将所有nuget程序包都包括在内,包括依赖项,因此它可能是重复的。

During the conversion it brought all nuget packages across including dependencies so it could be dulicates.

如何找出黄色警告三角形代表什么?

How do I find out what the Yellow warning triangles represent?

编辑

构建日志:


要防止NuGet在构建过程中还原软件包,请打开Visual
Studio Options对话框,单击NU1605:
检测到软件包降级:NUnit从3.8.1降为2.6.4。直接从项目中引用
包以选择其他版本。

MyProj.UI.Tests-> MyProj.Core.Tests-> NUnit(> = 3.8.1)

MyProj.UI.Tests-> NUnit(> = 2.6.4)NU1605:检测到包
降级:NUnit从3.8.1降到2.6.4。直接从项目中引用包
以选择其他版本。 MyProj.UI.Tests.iOS
-> MyProj.UI.Tests-> MyProj.Core.Tests-> NUnit(> = 3.8.1)MyProj.UI.Tests.iOS-> NUnit(> = 2.6。 4)NU1605:检测到软件包
降级:NUnit从3.8.1降到2.6.4。直接从项目中引用包
以选择其他版本。

MyProj.UI.Tests.Android-> MyProj.UI.Tests-> MyProj.Core.Tests->
NUnit(> = 3.8.1)MyProj.UI.Tests.Android-> NUnit(> = 2.6.4)

To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.' NU1605: Detected package downgrade: NUnit from 3.8.1 to 2.6.4. Reference the package directly from the project to select a different version.
MyProj.UI.Tests -> MyProj.Core.Tests -> NUnit (>= 3.8.1)
MyProj.UI.Tests -> NUnit (>= 2.6.4) NU1605: Detected package downgrade: NUnit from 3.8.1 to 2.6.4. Reference the package directly from the project to select a different version. MyProj.UI.Tests.iOS -> MyProj.UI.Tests -> MyProj.Core.Tests -> NUnit (>= 3.8.1) MyProj.UI.Tests.iOS -> NUnit (>= 2.6.4) NU1605: Detected package downgrade: NUnit from 3.8.1 to 2.6.4. Reference the package directly from the project to select a different version.
MyProj.UI.Tests.Android -> MyProj.UI.Tests -> MyProj.Core.Tests -> NUnit (>= 3.8.1) MyProj.UI.Tests.Android -> NUnit (>= 2.6.4)


推荐答案

在构建日志中,我偶然注意到:

In the build Log I happened to notice this:


C:\Program
文件\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\构建\Microsoft.NET.Sdk.DefaultItems.targets(199,5):
警告:一个PackageReference NETStandard.Library的项目已包含在
您的项目中。 .NET SDK
隐式引用了此程序包,通常不需要从项目中引用它。有关
的更多信息,请参见 https://aka.ms/sdkimplicitrefs

因此,我去了并卸载了 .Net Standard nuget 列在此处:

I therefore went and uninstalled all packages that were listed as dependencies for the .Net Standard nuget listed here:


.NETStandard 1.1


  • Microsoft.NETCore.Platforms(> = 1.1.0 )

  • Microsoft.NETCore.Platforms (>= 1.1.0)

System.Collections(> = 4.3.0)

System.Collections (>= 4.3.0)

System.Collections .concurrent(> = 4.3.0)

System.Collections.Concurrent (>= 4.3.0)

System.Diagnostics.Debug(> => 4.3.0)

System.Diagnostics.Debug (>=> 4.3.0)

System.Diagnostics.Tools(> = 4.3.0)

System.Diagnostics.Tools (>= 4.3.0)

System.Diagnostics.Tracing(> = 4.3.0)

System.Diagnostics.Tracing (>= 4.3.0)

System.Globalization(> = 4.3.0)

System.Globalization (>= 4.3.0)

System.IO( > = 4.3.0)

System.IO (>= 4.3.0)

System.IO.Compression(> = 4.3.0)

System.IO.Compression (>= 4.3.0)

System.Linq(> = 4.3.0)

System.Linq (>= 4.3.0)

System.Linq.Expressions(> = 4.3.0)

System.Linq.Expressions (>= 4.3.0)

System.Net.Http(> = 4.3.2)

System.Net.Http (>= 4.3.2)

System.Net.Primitives(> = 4.3.0)

System.Net.Primitives (>= 4.3.0)

System.ObjectModel(> = 4.3.0)

System.ObjectModel (>= 4.3.0)

System.Reflection(> = 4.3.0)

System.Reflection (>= 4.3.0)

System.Reflection.Extensions(> = 4.3.0)

System.Reflection.Extensions (>= 4.3.0)

System.Reflection.Primitives(> = 4.3.0)

System.Reflection.Primitives (>= 4.3.0)

System.Resources.ResourceManager(> = 4.3.0)

System.Resources.ResourceManager (>= 4.3.0)

System.Runtime(> = 4.3.0)

System.Runtime (>= 4.3.0)

System.Runtime。扩展(> = 4.3.0)

System.Runtime.Extensions (>= 4.3.0)

System.Runtime.InteropServices(> = 4.3.0)

System.Runtime.InteropServices (>= 4.3.0)

System.Runtime.InteropServices.RuntimeInformation(> => 4.3.0)

System.Runtime.InteropServices.RuntimeInformation (>=> 4.3.0)

System.Runtime.Numerics(> = 4.3.0 )

System.Runtime.Numerics (>= 4.3.0)

System.Text.Encoding(> = 4.3.0)

System.Text.Encoding (>= 4.3.0)

System .Text.Encoding.Extensions(> = 4.3.0)

System.Text.Encoding.Extensions (>= 4.3.0)

System.Text.RegularExpressions(> = 4.3.0)

System.Text.RegularExpressions (>= 4.3.0)

System.Threading(> = 4.3.0)

System.Threading (>= 4.3.0)

System.Threading.Tasks(> = 4.3.0 )

System.Threading.Tasks (>= 4.3.0)

System.Xml.ReaderWriter(> = 4.3.0)

System.Xml.ReaderWriter (>= 4.3.0)

System .Xml.XDocument(> = 4.3.0)

System.Xml.XDocument (>= 4.3.0)

和黄色警告

从此处: https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/

我还发现您可以使用如下所示的NoWarn属性:

I have also found you can use the NoWarn property like below:

<ItemGroup>
  <PackageReference Include="Huitian.PowerCollections" Version="1.0.0" NoWarn="NU1701" />
</ItemGroup>

这篇关于黄色警告三角形对Visual Studio 2017中的依赖关系意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆