Search code examples
asp.net-coreasp.net-mvc-scaffolding

Error Trying to Scaffold ResendEmailConfirmation in ASP.Net Core 6


I'm trying to create a scaffolded item in a project. I've tried with and without the Microsoft.VisualStudio.Web.CodeGeneration.Design v.6.016 installed, and in both situations I choose my Dbcontext and choose the ResendEmailConfirmation and it starts to generate and then gives me the following unhelpful error:

enter image description here

I'm not seeing any additional logging information but maybe I don't have some logging setting correct to give me more detailed logging for this? Nothing in the output window. It seems that an earlier developer was able to scaffold some other items in the project, (like forgotpassword), so it apparently worked at some point, but for some reason is not working for me right now. Any tips on how to get additional information on what exactly is going wrong?


Solution

  • I would consider trying to repair your VS installation via the installer and ensuring your installation is up to date.

    Something that may or may not help depending on when this is occurring is adding this to your appsettings.json and attempting to run the debug build:

      "Logging": {
        "LogLevel": {
          "Default": "Debug",
          "Microsoft": "Debug",
          "Microsoft.AspNetCore": "Debug",
          "Microsoft.VisualStudio.Web.CodeGeneration": "Debug"
        }
      }
    }
    

    If all else fails, try using the CLI code generator for scaffolding.