mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
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:
parent
9f1e61be92
commit
94c4c44bfc
4 changed files with 8 additions and 8 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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" />')
|
||||
|
|
|
|||
Loading…
Reference in a new issue