Skip to content

Make it clear that you may need to change the startup project #2270

Closed

Description

@Waveslam

I was adding EF Core support to an existing Solution that contained multiple projects, which included both a Main UI (WinForms) project (which is also set as the startup project), and all the database access code in a separate project.
While i was able to easily create an InitialCreate migration in Package Manager Console by ensuring i have the DAL project selected, i have just wasted 4 hours trying to work out why Update-Database doesnt work (kept failing with a NullReferenceException). I eventually discovered that I had to change the Startup Project from the WinForms project to the Database Project before it would work. The simplistic examples you present here dont have that problem because unlike any commercial software development, everything is in the one single project rather than separated. So can you please make it much clearer that you have to change the Startup Project. Thanks!


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. added this to the Backlog milestone on Apr 13, 2020
  2. lohoris-crane commented on Apr 17, 2020

    @lohoris-crane
    Contributor

    Instead of changing the startup project, you might simply be able to use the argument -ProjectName

  3. Waveslam commented on Aug 11, 2026

    @Waveslam
    Author
  4. added a commit that references this issue on Aug 11, 2026
    bb42937
  5. modified the milestones: Backlog, 11.0.0 on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions