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 <sheilk@microsoft.com>
This commit is contained in:
Sheil Kumar 2021-05-01 00:56:36 -07:00 committed by GitHub
parent 9f1e61be92
commit 94c4c44bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<ProjectName>Microsoft.AI.MachineLearning.Interop</ProjectName>
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net5.0-windows10.0.17763.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platform>Any CPU</Platform>
@ -15,8 +15,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="1.0.1" targetFramework="net5.0-windows10.0.19041.0" />
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" targetFramework="net5.0-windows10.0.19041.0" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="1.1.0" targetFramework="net5.0-windows10.0.17763.0" />
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.17763.1000" targetFramework="net5.0-windows10.0.17763.0" />
</ItemGroup>
<ItemGroup>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net5.0-windows10.0.17763.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>

View file

@ -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

View file

@ -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('<file src=' + '"' + os.path.join(args.native_build_path, interop_dll) +
'" target="lib\\net5.0\\Microsoft.AI.MachineLearning.Interop.dll" />')
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('<file src=' + '"' + os.path.join(args.native_build_path, interop_pdb) +
'" target="lib\\net5.0\\Microsoft.AI.MachineLearning.Interop.pdb" />')