Search code examples
c#wpfml.net-model-builder

Torch runtime cannot be installed when Visual Studio is an elevated 'Admin' mode


I'm having trouble with ML.NET tool in Visual Studio 2022:

Torch runtime cannot be installed when Visual Studio is an elevated 'Admin' mode.

This is the error, and it only happens with ML.NET's Train Mode, everything else is still working normally.

enter image description here


Solution

  • Install Ml.net outside of visual studio.

    Exit out of all Visual Studio instances. Run the Visual Studio Installer and select Modify. In the Installation details, on the right, at the bottom in Extensions select ML.Net Model Builder 2022 and install the tool.