Skip to content

Commit f850d36

Browse files
committed
Added the official Microsoft.AI.MachineLearning nuget.
1 parent 23b4fe8 commit f850d36

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

Samples/SqueezeNetObjectDetection/Desktop/cpp/SqueezeNetObjectDetectionCPP.vcxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.props" Condition="Exists('..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.props')" />
4+
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" />
45
<PropertyGroup Label="Globals">
56
<CppWinRTEnabled>true</CppWinRTEnabled>
67
<RequiredBundles>$(RequiredBundles);Microsoft.Windows.CppWinRT</RequiredBundles>
@@ -122,7 +123,6 @@
122123
</Link>
123124
</ItemDefinitionGroup>
124125
<ItemGroup>
125-
<ClInclude Include="..\..\..\..\SharedContent\models\SqueezeNet.h" />
126126
<ClInclude Include="pch.h" />
127127
</ItemGroup>
128128
<ItemGroup>
@@ -146,9 +146,6 @@
146146
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
147147
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</DeploymentContent>
148148
</CopyFileToFolders>
149-
<Text Include="readme.txt">
150-
<DeploymentContent>false</DeploymentContent>
151-
</Text>
152149
</ItemGroup>
153150
<ItemGroup>
154151
<CopyFileToFolders Include="..\..\..\..\SharedContent\models\SqueezeNet.onnx">
@@ -187,7 +184,8 @@
187184
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
188185
<ImportGroup Label="ExtensionTargets">
189186
<Import Project="$(SolutionDir)\packages\rapidjson.v110.1.1.0\build\native\rapidjson.targets" Condition="Exists('$(SolutionDir)\packages\rapidjson.v110.1.1.0\build\native\rapidjson.targets')" />
190-
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
187+
<Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
188+
<Import Project="..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.targets" Condition="Exists('..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.targets')" />
191189
</ImportGroup>
192190
<ItemDefinitionGroup>
193191
<ClCompile>
@@ -215,7 +213,9 @@
215213
<PropertyGroup>
216214
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
217215
</PropertyGroup>
218-
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
219-
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.1.0.181129.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
216+
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
217+
<Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
218+
<Error Condition="!Exists('..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.props'))" />
219+
<Error Condition="!Exists('..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.AI.MachineLearning.1.3.0\build\native\Microsoft.AI.MachineLearning.targets'))" />
220220
</Target>
221221
</Project>

Samples/SqueezeNetObjectDetection/Desktop/cpp/SqueezeNetObjectDetectionCPP.vcxproj.filters

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@
66
</ItemGroup>
77
<ItemGroup>
88
<ClInclude Include="pch.h" />
9-
<ClInclude Include="..\..\..\..\SharedContent\models\SqueezeNet.h" />
109
</ItemGroup>
1110
<ItemGroup>
1211
<None Include="packages.config" />
1312
</ItemGroup>
14-
<ItemGroup>
15-
<Text Include="readme.txt" />
16-
</ItemGroup>
1713
<ItemGroup>
1814
<Filter Include="SharedContent">
1915
<UniqueIdentifier>{397953d2-fcfa-440a-bf21-f7e8e088b7d2}</UniqueIdentifier>

Samples/SqueezeNetObjectDetection/Desktop/cpp/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
using namespace winrt;
88
using namespace Windows::Foundation;
99
using namespace Windows::Foundation::Collections;
10+
#ifdef USE_WINML_NUGET
11+
using namespace Microsoft::AI::MachineLearning;
12+
#else
1013
using namespace Windows::AI::MachineLearning;
14+
#endif
1115
using namespace Windows::Media;
1216
using namespace Windows::Graphics::Imaging;
1317
using namespace Windows::Storage;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="1.0.181129.3" targetFramework="native" />
3+
<package id="Microsoft.AI.MachineLearning" version="1.3.0" targetFramework="native" />
4+
<package id="Microsoft.Windows.CppWinRT" version="2.0.200316.3" targetFramework="native" />
45
</packages>

Samples/SqueezeNetObjectDetection/Desktop/cpp/pch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
#include <winrt/Windows.Graphics.h>
2020
#include <winrt/Windows.Graphics.Imaging.h>
2121

22+
#ifdef USE_WINML_NUGET
23+
#include "winrt/Microsoft.AI.MachineLearning.h"
24+
#endif
25+
2226
#include <string>
2327
#include <codecvt>
2428
#include <fstream>

0 commit comments

Comments
 (0)