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

查看:38
本文介绍了.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 Filesdotnetsdk2.2.104SdksMicrosoft.NET.Sdk	argetsMicrosoft.NET.ConflictResolution.targets(41,5): message NETSDK1041: Encountered conflict between
'Reference:C:Usersdev.nugetpackages
etstandard.library2.0.3uild
etstandard2.0
efSystem.ComponentModel.Composition.dll' and 
'Reference:C:Usersdev.nugetpackagessystem.componentmodel.composition4.5.0
ef
etstandard2.0System.ComponentModel.Composition.dll'.  NETSDK1034: Choosing 
'Reference:C:Usersdev.nugetpackagessystem.componentmodel.composition4.5.0
ef
etstandard2.0System.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 的引用来自哪里?

Where is that reference to System.ComponentModel.Composition.dll coming from?

推荐答案

我有时会无缘无故地得到一个黄色三角形.展开 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天全站免登陆