Fix Microsoft.AI.MachineLearning .NET5 publishing and C# Store Release build (#7373)

* fix .net publishing

* make experimental api build with microsoft.ai.machinelearning.idl import

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
This commit is contained in:
Sheil Kumar 2021-04-19 15:36:43 -07:00 committed by GitHub
parent bb1e417da0
commit 265db2ad96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -144,6 +144,7 @@ function(target_cppwinrt
/metadata_dir ${sdk_metadata_directory}
/W1 /char signed /nomidl /nologo /winrt
/no_settings_comment /no_def_idir /target "NT60"
/I ${CMAKE_CURRENT_BINARY_DIR}/winml_api
/I ${idl_source_directory}
/I ${um_sdk_directory}
/I ${shared_sdk_directory}

View file

@ -23,4 +23,8 @@
<Message Text="$([System.String]::Format('$(WindowsAIBinplaceMessage)', '$(WindowsAIBinary)', '$(OnnxRuntimeBinary)'))" />
<Copy SkipUnchangedFiles="True" SourceFiles="$(WindowsAIBinary);$(OnnxRuntimeBinary)" DestinationFolder="$(OutDir)" />
</Target>
<ItemGroup>
<ReferenceCopyLocalPaths Include="$(WindowsAIBinary);$(OnnxRuntimeBinary)" />
</ItemGroup>
</Project>

View file

@ -3,15 +3,16 @@
import "Windows.Foundation.idl";
import "dualapipartitionattribute.idl";
import "Windows.AI.MachineLearning.idl";
#include <sdkddkver.h>
#ifdef BUILD_INBOX
import "Windows.AI.MachineLearning.idl";
#define ROOT_NS Windows
#define INBOX_ONLY(x) x
#define OTB_ONLY(x)
#else
import "Microsoft.AI.MachineLearning.idl";
#define INBOX_ONLY(x)
#define OTB_ONLY(x) x
#endif