4

asp.net core .net 461

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 enter image description here

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",
  },

enter image description here

Community
  • 1
  • 1
proggrock
  • 3,239
  • 6
  • 36
  • 51
  • 2
    Try to update `Microsoft.Extensions.Logging.*` packages. Then, as usual, try to close VS, delete `.vs` folder, run `dotnet restore` from CMD. – Ilya Chumakov May 11 '17 at 20:36
  • 1
    I would start by upgrading to asp.net core 1.1.x if possible as there were some pretty major changes and improvements. That may or may not solve your specific problem but it will probably make your life easier in the long run. – univ May 12 '17 at 02:57
  • 1
    Look at your dependency graph in VS Project view (open every tree of Dependencies "folder" until you find the dependency which uses an very outdated ASP.NET Core version) – Tseng May 12 '17 at 06:03
  • removing Glimpse, running dotnet restore and restarting vs seemed to help. Thanks for the advice guys - @Ilya if you make your comment the answer I'll accept. – proggrock May 12 '17 at 21:19

1 Answers1

2

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

  • Close Visual Studio.
  • Delete .vs folder.
  • Run dotnet restore from CMD.
Ilya Chumakov
  • 23,161
  • 9
  • 86
  • 114