add-migration command not working in Nuget Package Manager Console - macos

I'm trying to learn .Net Core and I am currently stuck with this error.
When I open the NuGet Package Manager Console, the first error appears saying "Failure has occured while loading a type."
Then when I type my code add-migration addCategoryToDatabase, it returns me errors saying "add-migration : The term 'add-migration' is not recognized as the name of a cmdlet, function, script file, or operable program."
Now, I have search StackOverflow for the solutions and found these:
The term "Add-Migration" is not recognized
GitHub - add-migration : Installing Microsoft.EntityFrameworkCore.Tools fixed it.
I also tried closing the NuGet Package Manager > Save > Close VS 2019 > Open VS 2019 but the problem is still there.
I also tried to uninstall and install fresh new copy of VS with the help from this link.
I also need to mention that I am using MacOS Big Sur version 11.6
Appreciate your help on my issue.
Nuget Error
Extension
Installed Packages

Related

Cannot install nuget package because the current nuget package manager version is not supported (Entity Framework)

I upgraded to VS2022 and Dev Express XAF 21.2.4. When I run the Xaf wizard to generate a Winforms Entity Framework solution I get the following error:
Cannot install NuGet package because the current NuGet Package Manager
version is not supported. Please install the latest version of the
Nuget Package Manager and restart the wizard or add the reference
manually after the wizard finishes. Package:Entity Framework
From Nuget help I understand that Nuget comes with VS2022 so I don't understand how I can install the latest version.
[Update]
Typing nuget at the dos prompt or at the developer command prompt for VS 2022 I get
'nuget' is not recognized as an internal or external command, operable
program or batch file
I had this problem for a long time
upgrade vs code if it doesnt work
https://www.nuget.org/downloads download nuget.exe and manually run nuget restore in that folder

The specified task executable location ......csc.exe is invalid error

I have a project on TFS that is working on everyone else's machine, except mine. When building I get the error that can be seen in the image. "The specified task executable location csc.exe is invalid." currently trying to repair VS 2017 now.
Based on the message, seems the csc.exe is damaged.
Just try below things to narrow down the issue:
Navigate to the Microsoft.Net.Compilers package location, delete
the package folder, then rebuild. Generally the package will be
restored automatically during the build.
YOUR_PROJECT_DIR\packages\Microsoft.Net.Compilers.2.6.1
Uninstall and Re-install the Microsoft.Net.Compilers package:
Open Visual Studio
Go to Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution
Go to Installed tab and find Microsoft.Net.Compilers package
Uninstall the package from your project
Try to build your project now. (Thus it will use the default compiler which lives in the .NET framework folder:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe)
If you really need the Microsoft.Net.Compilers package then go ahead and find it in the Browse tab and install the latest stable
version.
Build the project and if everything works, make sure you commit changes to your code repository.
You can also try to run below command to uninstall and reinstall the
Nuget packages from the Package Manager Console: See Microsoft.Net.Compilers
Uninstall-Package Microsoft.Net.Compilers -Version 2.6.1
Install-Package Microsoft.Net.Compilers -Version 2.6.1
Remove Microsoft.CodeDom.Providers.DotNetCompilerPlatform and Microsoft.Net.Compilers Nuget Packages.
Installing MSBuild 2015 will resolve the issue.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=48159
I hit this question even though my error was "The specified task executable csc.exe could not be run" when pulling down existing web project with unit tests and trying to run it locally for the first time.
I was able to resolve this by building each project individually in my solution.

The term 'nuget' is not recognized

Trying to run any nuget command from PM Console and I get this error.
nuget : The term 'nuget' 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. At line:1 char:1
+ nuget update -self
What should the path be, when I run this command?
I saw this question and answer => 'nuget' is not recognized but other nuget commands working
and based on the answer, I copied the nuget.exe to the folder and set path. After doing that, I am still getting the same error.
NuGet command from PM Console is different with NuGet.exe CLI Reference. The command 'nuget' does not supported by the PM Console. Please check whether your NuGet command is correct first.
Besides, you can try to use other command from PM Console to verify this issue:
Get-Package -ListAvailable
If all command are not recognized, please check and update your Windows version. In the version 1511, you need to have been updated to .64 or later of the builds...otherwise you run into a powershell bug.
Then update the NuGet VSIX,
Open Visual Studio -> Tools -> Extensions and Update -> Updates,
Update Nuget Package Manager for Visual Studio 2013/2015 (note that: Restart your visual studio after update).

Could not find a part of the path AjaxMin.dll for AjaxControlToolkit

I created a brand new "ASP.NET Web Application" project in VS2013. Then trying to add AjaxControlToolkit from Nuget Package Manager. When I try to install the package I get following error:
Error:
Could not find a part of the path 'C:\Users\Chirag\AppData\Local\Temp\nuget\r25qb1tx.wpx\lib\net20\AjaxMin.dll
I tried to re-install Nuget package manager but it says its up-to-date. Please help!
Just realized that I was running VS2013 as normal mode and did not have enough permissions to copy files to target folder. When you "Run As Administrator", I was able to download/install the packages successfully.

Failed to open existing projects due to I\O error

While trying to open a project I observe the following error.
error : An IO error occurred while scanning the disk for installed platforms.
I have Visual Studio 2010 installed and the same project was working earlier. I have installed Python 2.6, SCons, command line version of SVN for a different project and then onwards am seeing this failure.
Could you suggest the possible error here?

Resources