dotnet cli - “检测到包降级" [英] dotnet cli - "detected package downgrade"

查看:21
本文介绍了dotnet cli - “检测到包降级"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在清除所有 nuget 缓存、dnx 的过程后,我终于设法使用 dotnet restore 下载了一个项目的依赖项缓存,并使用 Beta 频道更新 cli.

I have finally managed to get a project's dependencies downloaded with dotnet restore, after going through the process of clearing all nuget cache, dnx cache, and updating the cli using the beta channel.

但是使用下面的project.json,我得到一个错误;

But using the project.json below, I get an error;

警告:检测到包降级:Microsoft.Dnx.Compilation.CSharp.Abstractions 从 1.0.0-rc2-16553 到 1.0.0-rc2-16552

warn : Detected package downgrade: Microsoft.Dnx.Compilation.CSharp.Abstractions from 1.0.0-rc2-16553 to 1.0.0-rc2-16552

我不确定这是什么意思,也不知道如何解决.东西还在下载,但这让我担心.

I'm not sure what this means, or how to fix it. The things still download, but this concerns me.

我正在使用以下内容;

.NET Command Line Tools (1.0.0-beta-001540)

Product Information:
 Version:     1.0.0-beta-001540
 Commit Sha:  6aeed1f52d

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 Runtime Id:  win10-x64

dnvm 列表

Active Version           Runtime Architecture OperatingSystem Alias
------ -------           ------- ------------ --------------- -----
       1.0.0-rc1-update1 clr     x64          win
       1.0.0-rc1-update1 clr     x86          win
       1.0.0-rc1-update1 coreclr x64          win
       1.0.0-rc1-update1 coreclr x86          win
       1.0.0-rc2-16551   clr     x86          win
  *    1.0.0-rc2-16551   coreclr x64          win             default
       1.0.0-rc2-16551   coreclr x86          win

nuget.config

<packageSources>
    <add key="aspnet-core" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
    <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>

project.json

{
    "webroot": "wwwroot",
    "version": "1.0.0-*",
    "dependencies": {
        "Microsoft.NETCore.Platforms": "1.0.1-*",
        "Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
        "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
        "Microsoft.AspNetCore.Mvc": "1.0.0-*",
        "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
        "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
        "Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
        "Microsoft.Extensions.Configuration.Json": "1.0.0-*",
        "Microsoft.Extensions.Logging.Console": "1.0.0-*",
        "Microsoft.AspNetCore.Identity": "1.0.0-*",
    },
    "frameworks": {
        "dnx451": {
            "dependencies": {
                "Microsoft.AspNetCore.Mvc.Dnx": "1.0.0-*"
            }
        },
        "net451": { },
        "dnxcore50": {
            "imports": "portable-net451+win7+win8",
            "dependencies": {
                "NETStandard.Library": "1.0.0-*"
            }
        }
    },

    "publishExclude": [
        "node_modules",
        "bower_components",
        "**.xproj",
        "**.user",
        "**.vspscc"
    ],
    "exclude": [
        "wwwroot",
        "node_modules",
        "bower_components"
    ]
}

推荐答案

其中一个库明确要求 1.0.0-rc2-16552 版本,这就是您收到警告的原因.一旦库 u[grade to support更高版本警告就会消失.这是一篇旧帖子,因此不确定在您发帖时哪个库正在执行此操作,但是对于具有相同警告的人,请查看您的库并查看哪个库具有版本依赖性.基本上,删除库或保留降级版本,直到库更新并支持新版本.

One of the libraries explicitly require 1.0.0-rc2-16552 version, that's why you get the warning. Once the library u[grade to supports higher version warnings will disappear. This is an old post so not sure which library is doing this at the time of your post, but for people with same warning, go through your libraries and look which one has version dependency. Basically, remove the library or stay on downgraded version until the library updates and supports the new version.

这篇关于dotnet cli - “检测到包降级"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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