dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.58k stars 25.3k forks source link

Can't complete "Scaffold the movie model" #32974

Closed kanbandan closed 3 months ago

kanbandan commented 3 months ago

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

Rick-Anderson commented 3 months ago

All versions of VS use the correct NuGet feed.

To report Visual Studio problems Help > Send Feedback > Report a Problem

image