Adding Blazor Identity to existing Blazer project fails with a 'null path' exception

kodo65 10 Reputation points
2024-12-18T11:16:39.07+00:00

Hi!

I have the following:

  • .Net SDK 9
  • Visual Studio Community 2022 v 17.12.3
  • Windows v10.0.19044
  • Blazer Server App

When I try to add the Blazor Identity "scaffolding" I get a "There was an error running the selected code generator: 'Value cannot be null. (Parameter 'path'). I can see that some of the EF-framework assemblies and SQLite-engine was installed but nothing else. Is there a solution to this?

Cheers

Developer technologies | .NET | Blazor
Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. David Brenchley 20 Reputation points
    2025-05-25T02:40:34.5966667+00:00

    This is a poor work around, but it worked for me. I built a brand new Blazor net 8.0 project. I added the scaffolding and it worked. I then copied all the new files to my 9 project and the changes to the program.cs file and added the nuget packages. What a pain, but at least I can move forward.

    0 comments No comments

  2. kodo65 10 Reputation points
    2025-05-26T04:55:20.29+00:00

    I appreciate your reply and suggestion, however, I decided to skip the Identity Scaffolding altogether and rolled my own solution instead and have never looked back.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.