Skip to content

Bug creating scaffolding in VS 2022 #26592

@hcprobst

Description

@hcprobst

[Enter feedback here]
Whenever I try to add a scaffold to my controllers I get an error message and am unable to add the needed items

Finding the generator 'controller'...
Running the generator 'controller'...
Minimal hosting scenario!
Generating a new DbContext class 'TuitionWaiver.Data.TuitionWaiverContext'
Object reference not set to an instance of an object.
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.b__6_0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.Execute(String[] args)
at Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)

I had the same issues trying to do this in the RazorPagesMovie60 tutorial.

I need this to work please

Suggestions?


Document Details

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Source - Docs.msDocs Customer feedback via GitHub Issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions