I’ve created an ASP.NET Core 8 Web API project. I’ve created a number of controllers over the last months that I’ve been working on this. I use the scaffolded controllers (API with EF actions) as a starting point, as it provides all the basic code that I need, and then I just adapt / copy/paste things to create new endpoints within the controller.
Lately, I cannot use this feature in either VS2022 or VS2026 – I just get “Package restore failed – rolling back actions”. There doesn’t seem to be any debugging info or anything.
Here’s the list of packages that are installed:
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="Azure.Identity" Version="1.17.1" />
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.12.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.15">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Graph" Version="5.98.0" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.21.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration" Version="8.0.7" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="PdfSharpCore" Version="1.3.67" />
<PackageReference Include="PuppeteerSharp" Version="20.2.2" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.7" />
<PackageReference Include="Square" Version="41.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
</ItemGroup>
Does anyone have any idea how to find out which package restore is failing, or how to debug this? It’s really annoying not being able to use this feature.
I’ve tried all the usual things (clean and rebuild the project, clear the nuget cache etc).
Thanks
Colin