.net核心项目依赖项-黄色三角形 [英] .net core project dependencies - yellow triangle

查看:49
本文介绍了.net核心项目依赖项-黄色三角形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.Net Core项目在依赖项上有一个黄色三角形,但是当我打开它时,所有子项都没有一个黄色三角形.当我将鼠标悬停在依赖项上时,没有看到任何工具提示告诉我出了什么问题.如何检查导致这个黄色三角形出现的原因?

My .Net Core project has a yellow triangle on dependencies, but when I open it up, none of the child entries have a yellow triangle. When I hover over dependencies, I don't see any tooltip telling me what's wrong. How can I check to see what is causing this yellow triangle to show up?

我按照@oandreeeee的建议进行操作,并增加了构建的日志级别,我注意到了这一点:

I did what @oandreeeee suggested and increased the log level of my build and I noticed this:

C:\Program Files\dotnet\sdk\2.2.104\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(41,5): message NETSDK1041: Encountered conflict between
'Reference:C:\Users\dev\.nuget\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.ComponentModel.Composition.dll' and 
'Reference:C:\Users\dev\.nuget\packages\system.componentmodel.composition\4.5.0\ref\netstandard2.0\System.ComponentModel.Composition.dll'.  NETSDK1034: Choosing 
'Reference:C:\Users\dev\.nuget\packages\system.componentmodel.composition\4.5.0\ref\netstandard2.0\System.ComponentModel.Composition.dll' because file version '4.6.26515.6' is greater than '4.6.26419.2'.

这是我的.csproj文件:

This is my .csproj file:

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <WarningsAsErrors />
</PropertyGroup>

<ItemGroup>
    <PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.1" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
    <PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0" />
</ItemGroup>

</Project>

System.ComponentModel.Composition.dll 的引用从哪里来?

推荐答案

有时我会无缘无故地得到一个黄色三角形.展开NuGet/Projects/SDK元素,然后尝试查找是否存在带有另一个三角形和错误消息的元素.您还可以检查构建输出中是否有警告.无论哪种情况,都可能没有,只是显示故障.

I sometimes get a yellow triangle for no reason. Expand the NuGet/Projects/SDK elements and try find if there's an element with another triangle and an error message. You can also check the build output for warnings. In either case, there might be none and it's a display glitch.

这篇关于.net核心项目依赖项-黄色三角形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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