Closed apphipster closed 2 years ago
Running dotnet from the terminal is not quite the same as running it from VS Mac. The Terminal has a different PATH compared with GUI applications.
Was mainly wondering what the PATH is in the NuGet Package Manager Console.
Also is there a callstack or more information available on the $error variable? Possibly not based on your feedback post.
Is there a good way to reproduce this?
Reinstall NuGet Package Manager Console -> restart your VS for Mac, I solve with that
Just restart your IDE. Its works for me.
This should be fixed in latest release for VS Mac 17.0. Two changes were made: Ensure dotnet is available on the PATH when the PowerShell console is used. Also PowerShell v7 is now hosted in process in VS Mac 17.0, instead of being out of process.
I get the following Error in the Nuget Package Manager Console
PM> Update-Database Build started... Build succeeded.
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The term 'dotnet' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I am using:
By cleaning the project the issue goes away.
Visual Studio -> Build -> Clean All
Then when running again the command in NuGet PM it is executed without any issue.
PM> Update-Database Build started... Build succeeded. No migrations were applied. The database is already up to date. Done.
Note: The PATH is not changing and I can run the
dotnet
command using terminal whereas in Visual Studio NuGet Package Manager it is throwing the error.The issue was posted to the developer community web page: https://developercommunity.visualstudio.com/content/problem/913964/dotnet-the-term-dotnet-is-not-recognized-as-the-na.html
And also to stackoverflow: https://stackoverflow.com/questions/60141935/dotnet-is-not-recognized-as-the-name-of-a-cmdlet-macos/62122846#62122846