The minimum recommended version of Visual Studio with support for mlgen is 15.8.7. In Windows 10, version 1903 and later, mlgen is no longer included in the SDK, so you'll need to download and install the extension. There is one for Visual Studio 2017 and one for Visual Studio 2019.