Steve Ellwood

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 manager console -

add-migration : The term 'add-migration' 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.

Fortunately for me the resolution was trivial, all I needed to do was to add the relevant version of Microsoft.EntityFrameworkCore.Tools to my application and everything worked as expected

--

--

Steve Ellwood

Steve Ellwood

Senior Integrations Officer at Doncaster Council Any views expressed are entirely my own.