This issue has happened to me repeatedly on Visual Studio 2019 and the package concerned has varied considerably, it appears to be related to when I uninstall extensions that it goes particularly bad. Sometimes when you open Visual Studio you get a number of these messages and the option to ignore the message in future doesn’t prevent it from recurring.
The solution to this is remarkably straightforward, firstly shutdown all instances of Visual Studio, then delete the ComponentModelCache folder which can be found in the following folder
C:\Users\<UserName>\AppData\Local\Microsoft\VisualStudio\16.xxx
the user name is your login name. You may find in the VisualStudio folder a number of folders that are 16.xxx — I just deleted the ComponentModelCache folder from the one that had been used most recently and all seemed fine.
This is how to use the command line on a Mac to get information that you may occasionally need. It will be extended as I come across more that I find useful.
PATH
The path on a Mac is stored as an environment variable, just as in Windows. In order to see what it currently is use
echo $PATH
The path is stored in /etc/paths.d directory and that file can be edited to update the path
Path to an Executable
This command tells you where an executable is and can be used for debugging purposes
which <executable>
For much of my code I use the .NET Core LTS versions. Although the latest version at the time of writing is an LTS (v6) I can’t use it fully as I still have VS 2019 installed. As a result I target the previous LTS i.e. v3.1.
The simplest way for me to set this up is to declare the framework as a parameter. So if I am creating an MVC application for example I would use
dotnet new mvc --framework netcoreapp3.1
The framework option is a parameter of the mvc template and it takes the target framework moniker (TFM) as shown above.
I’m getting to grips with EF.Core, never having used it before I find it has a few quirks that I’m not used to. The first of these is the concept of a migration. I was trying to set up an initial migration and got the error in the nuget package…