Hi @Hochgurtel, Brian D,
Can you tell us which version of code generator you are using? And can you tell us your Visual Studio version?
From the error message, it seems that there was an issue with the package restoration process while working with the code generator.
You can try to refer to the following steps to troubleshoot and potentially resolve the problem.
- Check your Internet connection, make sure you can download/install the package.
- Clean and rebuild the project.
- Close and reopen the Visual Studio and reopen the project.
- Use NuGet Package Manager to check the installed packages, make sure you are installed the
Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.9
version. You can also try to in-install this package. - Try to clear the local package cache. You can use the
dotnet nuget locals all --clear
command.
Besides, I'm using Visual Studio Community 2022 (64-bit) Version 17.6.0 and 7.0.9 version code generator. The Scaffolding works well.
Besides, I also checked it using Visual Studio Community 2022 (64-bit) Version 17.7.4 and 7.0.9 version code generator, it also works well:
So, I suggest you can try to use the Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.9
version and upgrade the VS 2022 to the latest version.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion