-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add targets files for new .net6 frameworks (#12016)
* Add net6 targets. Remove maccatalyst as we don't have a native build targetting that. * Set platform in macos targets * Add targetFramework entries * Move NativeLib.DllName definition and set using preprocessor values for simplicity. Couldn't get it to build with the preprocessor based setup when it was in a separate file. Update the nuspec generation to set platform version for .net6 targets. TODO: Validate versions. I copied them from the managed nuget package the packaging pipeline generated prior to adding targets. Possibly w could/should lower some of the versions. Hopefully the need to specify a version goes away when the release version of VS2022 supports .net6. * Try android 31.1 as https://github.com/actions/virtual-environments/blob/main/images/win/Windows2022-Readme.md suggests that should be available on the CI machines * Fix patch version mismatch Add some extra debug info in case it helps * Debug nuget location in CI * Add workspace entry back in * Add steps * One more attempt with hardcoded nuget.exe path and original android31.0 version * Better fix - found explicit nuget download and updated version there. * flake8 fixes * Fix black complaints. * Exit Microsoft_ML_OnnxRuntime_CheckPrerequisites for net6 iOS. * Removed outdated comment
- Loading branch information
1 parent
c2f52cd
commit e849139
Showing
13 changed files
with
155 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
csharp/src/Microsoft.ML.OnnxRuntime/targets/net6.0-android/targets.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Condition=" '$(AndroidApplication)'=='true' "> | ||
<AndroidLibrary Include="$(MSBuildThisFileDirectory)..\..\runtimes\android\native\*"> | ||
<Link>%(Filename)%(Extension)</Link> | ||
</AndroidLibrary> | ||
</ItemGroup> | ||
</Project> |
21 changes: 21 additions & 0 deletions
21
csharp/src/Microsoft.ML.OnnxRuntime/targets/net6.0-ios/targets.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')"> | ||
<NativeReference Condition="'$(Platform)' == 'iPhoneSimulator'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework\ios-arm64_x86_64-simulator\onnxruntime.framework"> | ||
<Kind>Framework</Kind> | ||
<IsCxx>True</IsCxx> | ||
<SmartLink>True</SmartLink> | ||
<ForceLoad>True</ForceLoad> | ||
<LinkerFlags>-lc++</LinkerFlags> | ||
<WeakFrameworks>CoreML</WeakFrameworks> | ||
</NativeReference> | ||
<NativeReference Condition="'$(Platform)' == 'iPhone'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework\ios-arm64\onnxruntime.framework"> | ||
<Kind>Framework</Kind> | ||
<IsCxx>True</IsCxx> | ||
<SmartLink>True</SmartLink> | ||
<ForceLoad>True</ForceLoad> | ||
<LinkerFlags>-lc++</LinkerFlags> | ||
<WeakFrameworks>CoreML</WeakFrameworks> | ||
</NativeReference> | ||
</ItemGroup> | ||
</Project> |
21 changes: 21 additions & 0 deletions
21
csharp/src/Microsoft.ML.OnnxRuntime/targets/net6.0-macos/targets.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')"> | ||
<NativeReference Condition="'$(Platform)' == 'arm64'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx.10.14-arm64\native\libonnxruntime.dylib"> | ||
<Kind>Framework</Kind> | ||
<IsCxx>True</IsCxx> | ||
<SmartLink>True</SmartLink> | ||
<ForceLoad>True</ForceLoad> | ||
<LinkerFlags>-lc++</LinkerFlags> | ||
<WeakFrameworks>CoreML</WeakFrameworks> | ||
</NativeReference> | ||
<NativeReference Condition="'$(Platform)' == 'x64'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx.10.14-x64\native\libonnxruntime.dylib"> | ||
<Kind>Framework</Kind> | ||
<IsCxx>True</IsCxx> | ||
<SmartLink>True</SmartLink> | ||
<ForceLoad>True</ForceLoad> | ||
<LinkerFlags>-lc++</LinkerFlags> | ||
<WeakFrameworks>CoreML</WeakFrameworks> | ||
</NativeReference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters