- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 netcoreapp2.0 控制台应用程序中遇到以下 NU1605 依赖项错误:
NU1605 Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
MyProject -> Colorful.Console 1.2.6 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0)
MyProject -> System.Diagnostics.Debug (>= 4.0.11)
NU1605 Detected package downgrade: System.Runtime.Extensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
MyProject -> Colorful.Console 1.2.6 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.Extensions (>= 4.3.0)
MyProject -> Colorful.Console 1.2.6 -> System.Runtime.Extensions (>= 4.1.0) MyProject
NU1605 Detected package downgrade: System.Runtime.Handles from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
MyProject -> Colorful.Console 1.2.6 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.Handles (>= 4.3.0)
MyProject -> Colorful.Console 1.2.6 -> System.IO.FileSystem 4.0.1 -> System.Runtime.Handles (>= 4.0.1)
NU1605 Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
MyProject -> Colorful.Console 1.2.6 -> System.Console 4.0.0 -> runtime.win.System.Console 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
MyProject -> Colorful.Console 1.2.6 -> System.Runtime.InteropServices (>= 4.1.0)
我尝试在 csproj 中引用这些软件包版本,但这并不能解决问题。请参阅 csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Colorful.Console" Version="1.2.6" />
<PackageReference Include="CommandLineParser" Version="2.2.1" />
<PackageReference Include="DotSpinners" Version="1.2.0" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.0.11" />
<PackageReference Include="System.Runtime.Extensions" Version="4.1.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.0.1" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.1.0" />
</ItemGroup>
</Project>
它们似乎确实恢复得很好:
该项目还引用了 Microsoft.NETCore.App 2.0 SDK。
从 CLI 执行 dotnet 恢复时,我还收到以下错误,但我不确定是否相关:
C:\Program Files\dotnet\sdk\2.1.200\NuGet.targets(114,5): error : Failed to retrieve information about 'System.Runtime.Serialization.Formatters' from remote source 'https://mycompany.pkgs.visualstudio.com/_packaging/myid/nuget/v3/flat2/system.runtime.serialization.formatters/index.json'. [C:\MyProject\MyProject.sln]
C:\Program Files\dotnet\sdk\2.1.200\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\MyProject\MyProject.sln]
我不知道为什么它试图从我们的私有(private)公司包存储库检索有关“System.Runtime.Serialization.Formatters”的信息。
NuGet.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="mycompany" value="https://mycompany.pkgs.visualstudio.com/_packaging/Stable/nuget/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<mycompany>
<add key="Username" value="vsts" />
<add key="ClearTextPassword" value="xxx" />
</mycompany>
</packageSourceCredentials>
<disabledPackageSources>
<add key="Microsoft and .NET" value="true" />
</disabledPackageSources>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
<packageManagement>
<add key="format" value="0" />
<add key="disabled" value="False" />
</packageManagement>
</configuration>
如果这意味着什么的话,我还会收到以下 NU1603 警告:
NU1603 MyProject depends on System.Runtime.Handles (>= 4.1.0) but System.Runtime.Handles 4.1.0 was not found. An approximate best match of System.Runtime.Handles 4.3.0 was resolved.
最佳答案
我在使用 .netcoreapp2.2 控制台应用程序时遇到了类似的问题。
项目 build 成功。但是,发布失败并出现多个 NU1605 错误。
该问题源自log4net 2.0.8版本。它在 .netstandard2.0 项目中被引用,具有以下依赖项:
他们导致引用 log4net 的项目中的软件包降级。在发布过程中,这些警告被视为错误......
为了解决这个问题,我通过 Nuget 添加了这些库的正确版本。
终于发布成功了。
P.S. 当我第一次添加具有最新版本库的包时,依赖项列表上会显示黄色警告标志,就好像这些包不适合该项目一样。卸载项目并加载回来后,警告标志消失了! (我使用的是 Visual Studio 2019)
关于.net - 错误 NU1605 检测到软件包降级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50286990/
我在 sklearn 中使用 NuSVC 类。在尝试如下实例化 NuSVC 对象之后: self.classifier = OneVsRestClassifier(NuSVC()) 我发现我反复收到“
如何设置 Xom.nu,使元素像这样关闭: 而不是 。 我想这样做的原因是,这个 XML 将被导入到一个工具中,不幸的是,该工具识别以前的“关闭标记约定”。 最佳答案 XOM 是一个非常简单的 API
我在将数据从字符串转换为整数时遇到问题。 比如原始数据是这样的 orderdt[1:10,2] [1] 71004 13943 11337 9647 9363 6836 5957 5167
我的一个同事今天注意到 sort 命令有一些奇怪的行为,我想知道是否有人知道这个命令的输出是否是有意的? 给定文件: ABC_22 ABC_43 ABC_1 ABC_1 ABC_43 ABC_10 A
我想在一个文本文件中包含 nu.nl 的新闻标题,这样我就可以在我的一个 bash 脚本中使用它们。我也想用 bash 脚本提取这些标题。 我添加了今天 nu.nl 主页的屏幕截图 (http://i
我正在尝试弄清楚处理这种情况的最佳方法是什么。 假设我有一个被多个不同的不相关解决方案引用的库,我们称它为 WebServiceInterface.dll。该库依赖于 JSON.NET。 在 NuGe
我在玩这个site ,我陷入了 random4 问题。 所以,基本上,问题如下。 var random4 = new function() { var rand = Math.random();
我试图通过以下方式在Grails中将JSON转换为XML: import net.sf.json.JSONObject import net.sf.json.xml.XMLSerializer ...
我想使用 validator.w3.org/nu 的 API。 文档:https://github.com/validator/validator/wiki/Service:-Input:-GET 我
我正在尝试安装本地版本的 Validator.nu 服务器,但它在尝试构建 HTML 解析器时总是失败。 它说它找不到我在 .bashrc 文件中设置的 JAVA_HOME 变量,当我在提示符下键入“
我正在验证 HTML5 页面并返回以下 2 个警告:信息:内容类型为文本/html。使用 HTML 解析器。信息:使用支持 SVG 1.1、MathML 3.0、RDFa 1.1 和 ITS 2.0
关于 paper 的 mercury 说明如下: The if-then-else and negation constructs in most variants of Prolog are non
我正在尝试在 Sklearn 中创建一个 Matern 内核,并将参数 nu 设置为无穷大。 from sklearn.gaussian_process.kernels import Matern i
我正在尝试对具有 5000 列和 30 行的数据框进行 PCA Sample sum(is.na(Sample)) [1] 0 > sum(is.na(Sample.scaled)) [1] 90
在 Ed Kmett 的 recursion-scheme 包中,有三个声明: newtype Fix f = Fix (f (Fix f)) newtype Mu f = Mu (forall a.
我正在使用https://github.com/patternconsulting/opencv将 opencv 3.2.0 包含在我的 maven java 项目中。 我面临的问题是,当我使用
validator.nu gem 抛出 YAJL 弃用警告,偶尔会完全失败,引用 HTTPStream 的问题。是否有任何稳定的 ruby gem 可以验证 HTML5 文档? 例如 req1.9
我对R非常陌生,目前正在尝试创建Siber椭圆。 我观看了使用省略号比较社区成员的potcast :( http://www.tcd.ie/Zoology/research/research/theo
是否可以将 nu.XOM.Element 转换为 org.w3c.dom.Element? 我正在尝试使用 XOM API 构建 XML。但我的旧版 API 很少需要 org.w3c.dom.Elem
我使用了来自 XMLBeans 的 scomp 工具生成 java 类,然后填充 XmlObject 中的字段(我前段时间写了这段代码)。我现在需要将此对象转换为 Element XOM librar
我是一名优秀的程序员,十分优秀!