Error “dotnet : Could not find any project in `C:\**.” when running “dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount”

I encountered the same issue and found the fix. First of all, read the error message completely and carefully. It says:

“Could not find any project ….”

Which means it was expecting the project information. If you further watch the message closely, it has mentioned the correct usage of this command i.e.

Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>

In the argument, enter your project name and run it again. This time, you should see the success message similar to:

info : Adding PackageReference for package ‘Microsoft.xxxxxxxx.xxxxxxxx’ into project ‘C:\Users\xxx\source\repos\ProjectFolder\xxxxxxxx.csproj’.

demonstration of the error and the fix

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)