07-23-2023, 07:18 AM
I have visual studio 2019 and i created a new asp.net core 2.2 project. now i am following these steps [Configure Microsoft Account Authentication][1] to enable external login to our web application. but when i run this command:-
> dotnet add package
> Microsoft.AspNetCore.Authentication.MicrosoftAccount
i got this error:-
> PM> dotnet add package
> Microsoft.AspNetCore.Authentication.MicrosoftAccount dotnet : Could
> not find any project in `C:\Users\*****\source\repos\MSlogintest\`. At
> line:1 char:1
> + dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : NotSpecified: (Could not find ...\MSlogintest\`.:String) [], RemoteException
> + FullyQualifiedErrorId : NativeCommandError Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>
>
> Arguments: <PROJECT> The project file to operate on. If a
> file is not specified, the command will search the current directory
> for one. <PACKAGE_NAME> The package reference to add.
>
> Options: -h, --help Show command line help.
> -v, --version <VERSION> The version of the package to add. -f, --framework <FRAMEWORK> Add the reference only when targeting a specific framework. -n, --no-restore
> Add the reference without performing restore preview and compatibility
> check. -s, --source <SOURCE> The NuGet package source
> to use during the restore. --package-directory <PACKAGE_DIR> The
> directory to restore packages to. --interactive
> Allows the command to stop and wait for user input or action (for
> example to complete authentication).
as follow:-
[![enter image description here][2]][2]
and when i access the folder, i found that there is a VS project folders, as follow:-
[![enter image description here][3]][3]
so why the error is saying that it can not find any project?
can anyone advice on this error please?
Thanks
[1]:
[3]:
> dotnet add package
> Microsoft.AspNetCore.Authentication.MicrosoftAccount
i got this error:-
> PM> dotnet add package
> Microsoft.AspNetCore.Authentication.MicrosoftAccount dotnet : Could
> not find any project in `C:\Users\*****\source\repos\MSlogintest\`. At
> line:1 char:1
> + dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : NotSpecified: (Could not find ...\MSlogintest\`.:String) [], RemoteException
> + FullyQualifiedErrorId : NativeCommandError Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>
>
> Arguments: <PROJECT> The project file to operate on. If a
> file is not specified, the command will search the current directory
> for one. <PACKAGE_NAME> The package reference to add.
>
> Options: -h, --help Show command line help.
> -v, --version <VERSION> The version of the package to add. -f, --framework <FRAMEWORK> Add the reference only when targeting a specific framework. -n, --no-restore
> Add the reference without performing restore preview and compatibility
> check. -s, --source <SOURCE> The NuGet package source
> to use during the restore. --package-directory <PACKAGE_DIR> The
> directory to restore packages to. --interactive
> Allows the command to stop and wait for user input or action (for
> example to complete authentication).
as follow:-
[![enter image description here][2]][2]
and when i access the folder, i found that there is a VS project folders, as follow:-
[![enter image description here][3]][3]
so why the error is saying that it can not find any project?
can anyone advice on this error please?
Thanks
[1]:
[To see links please register here]
[2]:[3]: