Home > OS >  Nothing to do. None of the projects specified contain packages to restore dotnet restore
Nothing to do. None of the projects specified contain packages to restore dotnet restore

Time:09-22

I am working on an ASP.NET Web API 2 project with .NET target framework 4.6.1. I am trying to setup github workflow for my enter image description here

I am getting the same error if I run the same command in from command prompt inside my project. Also if I run dotnet build, it shows below error.

enter image description here

The project builds fine from Visual Studio but not working from command line or enter image description here

So you have to move the nuget package references to csproj file itself

Here is a great comment on how to do that https://stackoverflow.com/a/65701746/8318698

Note: check that if multiple projectGuid is there on csproj at the end of the steps

After that you will be able to use dotnet restore without a hitch.

  • Related