1

At the moment I'm doing the Tutorial "ASP.NET Core Mvc Web App" from Microsoft (Link: https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/start-mvc?view=aspnetcore-6.0&tabs=visual-studio).

I'm using Visual Studio Code with the .net version 6.0. I have the following extensions installed:

  • C#
  • Jupyter, Jupyter Keymap and Jupyter Notebook Renders
  • SQLITE

At the third chapter "model" I'm having some issues.

One of my biggest issue is the database. I need to enter this code:

dotnet ef database update

after some time it shows this error: Error Message:

enter image description here

[...] Unable to locate a Local Database Runtime installation [...]

What can I do? Did I forget something? Is that a proxy issue? I am a beginner. Hope you can help me.

1
  • 1
    Please copy the text from your console into your question as text, not an image. Commented Nov 25, 2021 at 9:50

1 Answer 1

2

You're using SQLite, but the tutorial uses SQL Server. The EF Core console app sample uses SQLite though.

Instead of installing Microsoft.EntityFrameworkCore.SqlServer, use:

dotnet add package Microsoft.EntityFrameworkCore.Sqlite

And instead of UseSqlServer(), use:

options.UseSqlite($"Data Source={DbPath}");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.