EFCore add-migration error : Error: The calling thread must be STA, because many UI components require this

169 views Asked by At

Error: An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: The calling thread must be STA, because many UI components require this.

  • I just update my VisualStudio to Version 17.3.5.
  • I added some Nuget Package too.
  • I use PostgreSql as my database.
  • All my Nuget Packages are updated.
  • I had no migration problems before. This error is new.

I already have : Microsoft.EntityFrameworkCore.Tools in the project where my DataContext is defined. Ref: An error occurred while accessing the Microsoft.Extensions.Hosting services when do first migrations

Why this error?

enter image description here

0

There are 0 answers