From 94c4c44bfc79257253ee3bc1db2f4ffd83c1cdac Mon Sep 17 00:00:00 2001 From: Sheil Kumar Date: Sat, 1 May 2021 00:56:36 -0700 Subject: [PATCH] Enable Microsoft.Ai.MachineLearning package to work on .NET5 down to 17763 Windows SDK (#7522) * upgrade cswinrt and downgrade target framework * fix sdk version references * cswinrt 1.1.0 Co-authored-by: Sheil Kumar --- .../Microsoft.AI.MachineLearning.Interop.csproj | 6 +++--- .../Microsoft.AI.MachineLearning.Tests.DotNet5_0.csproj.pp | 2 +- .../github/azure-pipelines/nuget/templates/windowsai.yml | 4 ++-- tools/nuget/generate_nuspec_for_native_nuget.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/csharp/src/Microsoft.AI.MachineLearning.Interop/Microsoft.AI.MachineLearning.Interop.csproj b/csharp/src/Microsoft.AI.MachineLearning.Interop/Microsoft.AI.MachineLearning.Interop.csproj index 689d281d02..2fcae569d3 100644 --- a/csharp/src/Microsoft.AI.MachineLearning.Interop/Microsoft.AI.MachineLearning.Interop.csproj +++ b/csharp/src/Microsoft.AI.MachineLearning.Interop/Microsoft.AI.MachineLearning.Interop.csproj @@ -2,7 +2,7 @@ Microsoft.AI.MachineLearning.Interop - net5.0-windows10.0.19041.0 + net5.0-windows10.0.17763.0 true Any CPU @@ -15,8 +15,8 @@ - - + + diff --git a/csharp/test/Microsoft.AI.MachineLearning.Tests.DotNet5_0/Microsoft.AI.MachineLearning.Tests.DotNet5_0.csproj.pp b/csharp/test/Microsoft.AI.MachineLearning.Tests.DotNet5_0/Microsoft.AI.MachineLearning.Tests.DotNet5_0.csproj.pp index a5d96747bc..fcdf767281 100644 --- a/csharp/test/Microsoft.AI.MachineLearning.Tests.DotNet5_0/Microsoft.AI.MachineLearning.Tests.DotNet5_0.csproj.pp +++ b/csharp/test/Microsoft.AI.MachineLearning.Tests.DotNet5_0/Microsoft.AI.MachineLearning.Tests.DotNet5_0.csproj.pp @@ -2,7 +2,7 @@ Exe - net5.0-windows10.0.19041.0 + net5.0-windows10.0.17763.0 AnyCPU;x64 diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/windowsai.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/windowsai.yml index 1e0b270e45..ad97bd5c04 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/windowsai.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/windowsai.yml @@ -630,12 +630,12 @@ jobs: popd Write-Host "Run Microsoft.AI.MachineLearning CSharp Tests (DotNet5_0)" - pushd .\Microsoft.AI.MachineLearning.Tests.DotNet5_0\bin\Debug\net5.0-windows10.0.19041.0 + pushd .\Microsoft.AI.MachineLearning.Tests.DotNet5_0\bin\Debug\net5.0-windows10.0.17763.0 .\Microsoft.AI.MachineLearning.Tests.DotNet5_0.exe popd Write-Host "Run Microsoft.AI.MachineLearning CSharp Tests (AnyCpu)" - pushd .\Microsoft.AI.MachineLearning.Tests.DotNet5_0\bin\x64\Debug\net5.0-windows10.0.19041.0 + pushd .\Microsoft.AI.MachineLearning.Tests.DotNet5_0\bin\x64\Debug\net5.0-windows10.0.17763.0 .\Microsoft.AI.MachineLearning.Tests.DotNet5_0.exe popd diff --git a/tools/nuget/generate_nuspec_for_native_nuget.py b/tools/nuget/generate_nuspec_for_native_nuget.py index 2f05ac59a8..b240670d2d 100644 --- a/tools/nuget/generate_nuspec_for_native_nuget.py +++ b/tools/nuget/generate_nuspec_for_native_nuget.py @@ -288,11 +288,11 @@ def generate_files(list, args): 'microsoft.ai.machinelearning.experimental.winmd') + '" target="winmds\\Microsoft.AI.MachineLearning.Experimental.winmd" />') if args.target_architecture == 'x64' and not args.is_store_build: - interop_dll_path = 'Microsoft.AI.MachineLearning.Interop\\net5.0-windows10.0.19041.0' + interop_dll_path = 'Microsoft.AI.MachineLearning.Interop\\net5.0-windows10.0.17763.0' interop_dll = interop_dll_path + '\\Microsoft.AI.MachineLearning.Interop.dll' files_list.append('') - interop_pdb_path = 'Microsoft.AI.MachineLearning.Interop\\net5.0-windows10.0.19041.0' + interop_pdb_path = 'Microsoft.AI.MachineLearning.Interop\\net5.0-windows10.0.17763.0' interop_pdb = interop_pdb_path + '\\Microsoft.AI.MachineLearning.Interop.pdb' files_list.append('')