我无法确定这个问题的根本原因.
图案:
Dependency Conflict. [project name] [project version] expected [dependency name] >= [registered version] but received [lower version]
Dependency specified was [dependency name] >= [registered version] but ended up with [dependency name] [lower version]
示例:我对依赖项Microsoft.Extensions.Logging v1.1.1发出此警告:
Dependency Conflict. Statistics 1.0.0 expected Microsoft.Extensions.Logging >= 1.1.1 but received 1.1.0
Dependency specified was Microsoft.Extensions.Logging >= 1.1.1 but ended up with Microsoft.Extensions.Logging 1.1.0
值得注意的是,在运行Update-Packages cmdlet之前,project.json文件确实引用了Microsoft.Extensions.Logging的v1.1.0.
更新后的project.json文件:
{ "buildOptions": { "emitEntryPoint": true,"preserveCompilationContext": true,"xmlDoc": true,"Nowarn": [ "CS1591" ] },"dependencies": { "BusinessEntities": "1.0.0-*","IdentityServer4.AccesstokenValidation": "1.1.0","Ioc": "1.0.0-*","Microsoft.AspNet.WebApi.Client": "5.2.3","Microsoft.AspNetCore.Diagnostics": "1.1.1","Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.1","Microsoft.AspNetCore.Mvc": "1.1.2","Microsoft.AspNetCore.Routing": "1.1.1","Microsoft.AspNetCore.Server.IISIntegration": "1.1.1","Microsoft.AspNetCore.Server.Kestrel": "1.1.1","Microsoft.AspNetCore.Server.Kestrel.Https": "1.1.1","Microsoft.Extensions.Configuration.CommandLine": "1.1.1","Microsoft.Extensions.Configuration.Environmentvariables": "1.1.1","Microsoft.Extensions.Configuration.FileExtensions": "1.1.1","Microsoft.Extensions.Configuration.Json": "1.1.1","Microsoft.Extensions.Logging": "1.1.1","Microsoft.Extensions.Logging.Console": "1.1.1","Microsoft.Extensions.Logging.Debug": "1.1.1","Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.1","Microsoft.VisualStudio.Web.browserLink.Loader": "14.1.0","Swashbuckle.AspNetCore": "1.0.0-rc1","Swashbuckle.AspNetCore.Swagger": "1.0.0-rc1","Swashbuckle.AspNetCore.SwaggerGen": "1.0.0-rc1","Swashbuckle.AspNetCore.SwaggerUi": "1.0.0-rc1","System.Xml.XmlDocument": "4.3.0","Unity": "4.0.1","WebApiCommon": "1.0.0-*" },"frameworks": { "netcoreapp1.1": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform","version": "1.1.1" } },"imports": [ "dotnet5.6","portable-net45+win8" ] } },"publishOptions": { "include": [ "wwwroot","**/*.cshtml","appsettings.json","web.config" ] },"runtimeOptions": { "configProperties": { "System.GC.Server": true } },"scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] },"tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final","Microsoft.DotNet.Watcher.Tools": "1.1.0-preview4-final" } }
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。