The Wayback Machine - http://web.archive.org/web/20201215060028/https://github.com/github/VisualStudio/issues/2541
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code first not set up when creating ASP.NET Core 3.1 web application #2541

Open
SoftCircuits opened this issue Sep 1, 2020 · 1 comment
Open

Comments

@SoftCircuits
Copy link

@SoftCircuits SoftCircuits commented Sep 1, 2020

Versions

  • Visual Studio version: 16.7.2

What happened

A few months ago, I created a new ASP.NET Core 3.1 web application. As I recall, Visual Studio created a Data folder, a Migrations folder, and a Models folder. It created an initial migration and configured the solution such that the Add-Migration and Update-Database commands were available in Package Manager Console.

I've just created another web application after installing 16.7.2 and none of these things are happening. None of the folders are created and the Add-Migration and Update-Database commands are not recognized.

Although I'm still getting used to code first, this worked pretty good last time. I can't tell if these working features have been removed for some reason, or if there's a problem with my install.

Steps to Reproduce

  1. Create a new project.
  2. Selected Web Application, .NET Core, ASP.NET Core 3.1, No Authentication, Configured for HTTPS (no other options selected).
  3. No Data, Migrations, or Models folders are created. No database context is created. The Add-Migration and Update-Database commands are not recognized.

Expected behavior

I wanted it to work like the last time I created a web application.

@SoftCircuits
Copy link
Author

@SoftCircuits SoftCircuits commented Sep 1, 2020

It looks like the difference this type is that I did not set up user authentication. When I configure this for an Individual User, the expected scaffolding is created.

This seems less than ideal. What if I don't want authentication in my app? Why should that make a difference on setting up code first? And it's hard for the user to recognize this was the cause, as they seem unrelated.

NOTE: The Add-Migration and Update-Database commands are still unrecognized. It would be very nice if Visual Studio could configure the solution so that these commands are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.