For .NET Core Database-First scaffolding, how do I get the server connection ?

Hi,
I have an ASP.NET MVC Core 2.1.1 project running in Visual Studio 2019.
Since I have already created a database, I want to connect the application to the existing database with database-first development.
From the Visual Studio, Package Manager Console, I put in:

Scaffold-DbContext "server=ServerName;Database=DbName; Trusted_Connection=true; Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

That gives me the following error:
The EF Core tools version '2.1.1-rtm-30846' is older than that of the runtime '2.1.8-servicing-32085'. Update the tools for the latest features and bug fixes.
Unable to find provider assembly with name server=ServerName. Ensure the specified name is correct and is referenced by the project.

I got the name, ServerName, directly from the Visual Studio connection properties:
Data Source=ServerName; Initial Catalog=DbName; Integrated Security=True

Is there something different I should put for ServerName?
Babak SekandariProgrammer / AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technology NinjaCommented:
Hi Babak,

Scaffold-DbContext "server=ServerName;Database=DbName; Trusted_Connection=true;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

Open in new window


You were missing a double-inverted comma.

Regards,
Chinmay.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.