When adding the new scaffolded item, VS community fails with error
There was an error running the selected code generator: 'Package restore failed. Rolling Back package changes for 'RazorPagesMovie'.' I eventually fixed it by adding the online reference: https://api.nuget.org/v3/index.json which I found as a solution online. "For a build your first" walkthrough, you need to test it on a completely "vanilla" clean install of VS community, which is what people using the tutorial will have, so unless you've told us to install that package (and how) the tutorial will not work.
Description
When adding the new scaffolded item, VS community fails with error There was an error running the selected code generator: 'Package restore failed. Rolling Back package changes for 'RazorPagesMovie'.' I eventually fixed it by adding the online reference: https://api.nuget.org/v3/index.json which I found as a solution online. "For a build your first" walkthrough, you need to test it on a completely "vanilla" clean install of VS community, which is what people using the tutorial will have, so unless you've told us to install that package (and how) the tutorial will not work.
Page URL
https://learn.microsoft.com/en-gb/aspnet/core/tutorials/razor-pages/model?view=aspnetcore-8.0&tabs=visual-studio
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/razor-pages/model.md
Document ID
7096fdb3-612e-9e00-bd0b-8ea4886a09ce
Article author
@wadepickett