ML.NET Tutorial - Get started in 10 minutes

Create your app

Open Visual Studio and create a new .NET Core console app:

  1. Select Create a new project from the Visual Studio 2019 start window.
  2. Choose the C# Console App (.NET Core) project template.
  3. Change the project name to myMLApp.
  4. Make sure Place solution and project in the same directory is unchecked.
  5. Create the project.

Add machine learning

Right-click on the myMLApp project in Solution Explorer and select Add > Machine Learning.

This opens ML.NET Model Builder in a new docked tool window in Visual Studio. Model Builder will guide you through the process of building a machine learning model in the following steps.

In your terminal, run the following commands:

Command prompt
mkdir myMLApp
cd myMLApp
dotnet new console -o consumeModelApp

The mkdir command creates a new directory named myMLApp, and the cd myMLApp command puts you into the newly created app directory. The dotnet command creates a new C# application of type console for you. The -o parameter creates a directory named consumeModelApp where your app is stored, and populates it with the required files.

Your model training code will be generated in the upcoming steps.