Josh
Josh

Reputation: 107

ML.NET fails to run on uwp

I built a UWP App in Visual Studio 2017 and also added a class library in the solution to run ML.NET but every time I run the application I get an exception

PlatformNotSupportedException. Retrieving information about local processes is not supported on this platform

What could be the problem?

Upvotes: 2

Views: 706

Answers (4)

MrCSharp
MrCSharp

Reputation: 1143

ML.Net 0.7 now supports both x86 and x64 platforms... not ARM support yet.

https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcing-ml-net-0-7-machine-learning-net/

Upvotes: 1

Josh
Josh

Reputation: 107

I figured out how to solve my problem. I decided to first train the model on a .NET Core console app the export the trained model in my UWP app. It worked perfectly. Thanks to this post

Upvotes: 3

Martin Zikmund
Martin Zikmund

Reputation: 39092

This is a .NET Standard exception that happens when the a library tries to access an API which is not actually implemented on the platform but is present to make the platform .NET Standard compliant. In this case it seems ML.NET is trying to get process information which is not implemented in UWP yet so it fails with the given exception.

I would suggest filing this as an issue in the ML.NET GitHub issues to get first-party advice on if there is a workaround or to inform the team that developers need this to be able to use the library in UWP.

Upvotes: 4

Markus Weimer
Markus Weimer

Reputation: 61

ML.NET only supports x64 projects at this time. Is your project an x86 project by any chance?

Upvotes: 1

Related Questions