0

As you do I googled this and did not get much in the way of targeted results.

I have updated my project to .NET Core 5 and in particular using SDK 5.0.100-preview.8.20417.9 with the latest preview of Visual Studio 2019.

The SDK is 5.0.100-preview.8.20417.9 [C:\Program Files\dotnet\sdk].

I ran a migration using:

dotnet ef migrations add INITIAL --context CATALOGContext -s ../Jobsledger.API

and got the following error:

An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider.

Error: Method not found: 'Microsoft.AspNetCore.Authentication.AuthenticationBuilder Microsoft.AspNetCore.Authentication.AuthenticationBuilder.AddScheme(System.String, System.String, System.Action`2<System.__Canon,!!2>)'.

I found this on Stackoverflow and also this

That second one indicates they have deprecated some of what was once there.

I had this working in an earlier version of my program and I also included IDesignTimeDbContextFactory in a migrations file in the startup and that did work before.

Can someone point me in the right direction with this. The error (for me) is cryptic and when I look closely at what that second option indicates it tells me they pulled out code that I needed.. however I am lost on this..

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
si2030
  • 3,895
  • 8
  • 38
  • 87
  • When did it stop working? What version of SDK were you using before upgrade. It looks like it is an authentication issue. Five years ago the industry obsoleted TLS 1.0/1.1 which is used for authentication due to encryption had security flaws. Microsfot in June pushed a Security updated to windows which disabled TLS 1.0/1.1 on servers and require the use of TLS 1.2. One possibility for this error is your client is still using TLS 1.0/1.1, I do not have enough info to be positive. – jdweng Sep 07 '20 at 14:42

1 Answers1

0

Please try "Consolidate" from NuGet in Manage Nuget Packages, I had the same issue and solved it when versions were different between projects. If not, please give us the PM console message with the berbose option