ASPNet Core-在Startup.cs配置中调用不明确 [英] ASPNet Core - the call is ambiguous in Startup.cs configure

查看:168
本文介绍了ASPNet Core-在Startup.cs配置中调用不明确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

asp.net核心 .net 461

asp.net core .net 461

project.json中的依赖项导致歧义错误,我在查找它时遇到了麻烦.感谢您的帮助!

A dependency in my project.json is causing ambiguity errors, I'm having trouble locating it. Any help is appreciated!

这类似于

This is similar to this question, but it's not as obvious (to me) where the problem lies.

Startup.cs

project.json

"dependencies": {
 "Glimpse": "2.0.0-beta1",
"log4net": "2.0.8",
"MailKit": "1.16.0",
"Microsoft.ApplicationInsights.AspNetCore": "2.0.0",
"Microsoft.AspNetCore.Authentication": "1.1.2",
"Microsoft.AspNetCore.Authentication.JwtBearer": "1.1.2",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.2",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.ResponseCaching": "1.1.2",
"Microsoft.AspNetCore.ResponseCompression": "1.0.2",
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.1.2",
"Microsoft.EntityFrameworkCore": "1.1.2",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.UserSecrets": "1.1.2",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
"MimeKit": "1.16.0",
  },

推荐答案

尝试更新Microsoft.Extensions.Logging.*软件包.然后,像往常一样:

Try to update Microsoft.Extensions.Logging.* packages. Then, as usual:

  • 关闭Visual Studio.
  • 删除.vs文件夹.
  • 从CMD运行dotnet restore.
  • Close Visual Studio.
  • Delete .vs folder.
  • Run dotnet restore from CMD.

这篇关于ASPNet Core-在Startup.cs配置中调用不明确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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