I have a website in ASP.Net Core (structure 4.6.1) that uses the external logic of Facebook and MS created using Visual Studio 2015 and opened in the new Visual Studio 2017 that appeared yesterday. VS2017 made several changes related to csproj, project.json, etc.
The site was compiled and executed perfectly, with the exception of one part. If I made an external login to Facebook or Microsoft, the site displayed this trap:
FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) AggregateException: Unhandled remote failure. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler+<HandleRemoteCallbackAsync>d__6.MoveNext()
The browser URL showed that he was trying to return from the external login to the local one ( https: // localhost: 44321 / signin-facebook? Code = ... or / -Microsoft registered).
The version number of System.Diagnostics.DiagnosticSource.dll (and System.Net.Http.dll) is 4.6.24705.1.
I started the new VS2017 project from scratch with the addition of Facebook and MS, and it worked perfectly - I was launched without a trap. Dll were identical versions.
Comparing the two csproj files showed differences, but nothing obvious (nothing related to system dlls):

authentication asp.net-core visual-studio-2017 facebook-login
Gardavis
source share