visual-studionugetwindows-machine-learning

CppWinRT wont generate headers for another nuget package


I'm trying to get this tutorial to work: port-to-nuget. (Note that cppwinrt provides the Windows.AI.MachineLearning namespace, but for quicker releases a different nuget package provides the Microsoft.AI.MachineLearning namespace)

Apparently the C++/WinRT toolkit is meant to pick up on the Microsoft.AI.MachineLearning NuGet package and generate the appropriate headers in the Generated Files\winrt folder.

However, I've tried creating a new console app, adding the CppWinRT and Microsoft.AI.MachineLearning nuget packages with the following code but am still getting the following error

fatal error C1083: Cannot open include file: 'winrt/Microsoft.AI.MachineLearning.h': No such file or directory

The following duplicate question doesn't help: Cannot open microsoft.ai.machinelearning.h from NuGet package


Solution

  • I installed the wrong nuget package

    Microsoft.AI.DirectML +250k downloads instead of Microsoft.AI.MachineLearning +38k downloads.