Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to compile UWP project using .NET native with OnnxRuntime reference[Build] #18771

Open
songshizhao opened this issue Dec 10, 2023 · 6 comments
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@songshizhao
Copy link

songshizhao commented Dec 10, 2023

Describe the issue

I build a nuget packgae with onnxruntime using .net standard 2.0
NuetPackage: https://github.com/songshizhao/AnimeGANv2_Sharp
it should be widely compatible in UWP/Winui ...
If I use WINUI3 empty template prj ,there is no building issue.
But the project cannot be compiled in a empty UWP prj with package using onnxruntime mentioned above, I get error: ILT0005.
Same as #4252

same situation for other package using onnxruntime like: https://github.com/FaceONNX/FaceONNX
Do we must migrate the old UWP project to winui if we want to use onnxruntime ?
Hope this build issue be fixed

Urgency

No response

Target platform

UWP

Build script

empty

Error / output

ILT0005: “C:\Users\Administrator.nuget\packages\runtime.win10-x86.microsoft.net.native.compiler\2.2.12-rel-31116-00\tools\x86\ilc\Tools\nutc_driver.exe @...\TestPackage\obj\x86\Release\ilc\intermediate\MDIL\TestPackage.rsp"”

Visual Studio Version

22

GCC / Compiler Version

No response

@songshizhao songshizhao added the build build issues; typically submitted using template label Dec 10, 2023
@skottmckay
Copy link
Contributor

What netstandard version does the 'empty UWP prj' require?

I'm not familiar with the UWP requirements but based on discussions like this I wonder if it's trying to support old Windows 10 versions that require netstandard 1.4. If so, is there maybe a configuration option to tell it to use netstandard 2.0?

@songshizhao
Copy link
Author

@skottmckay
Here is my information.
standard2.0 NuGet package build successfully but UWP native compile can't pass with error ILT0005

actually, in UWP prj I have another choice is to use Windows.ai.machinelearning namespace instead msft.ai
Its working well for most situations, but there still problems , I don't know where to report these issues:
its depends on machine OS version, only win11 can load one of my onnx model successfully, for win10 exception occur when load_onnx_from_stroageFile ,return a null
and i tried to use Windows.ai.machinelearning with Windows.ai.directML nuget package ,load_onnx_from_stroageFile exception for both win10/win11: no registration class provided
so my prj is using UWP Windows.ai namespace (without nuget package ) and ai function work only for win11.

@skottmckay
Copy link
Contributor

The Microsoft.AI.MachineLearning package has different target frameworks (includes uap10.0) so if that works better in general we can focus on the issues that has.

Can you please provide a minimal reproduction of the issue. Solution, project files and code? It's not clear what load_onnx_from_stroageFile is (is it a misspelling of something provided by the nuget package or a function you have defined) and you haven't included specific exception info, so a reproduction will be the easiest way to see the exact error details.

@songshizhao
Copy link
Author

songshizhao commented Dec 18, 2023 via email

@skottmckay
Copy link
Contributor

Please provide a minimal reproduction of the issue as there are still many variables at play.

e.g.

  • Visual Studio version (2019 vs 2022),
  • whether it's an issue in the code using ORT
    • creating an empty project is not going to have a call to load an ONNX model that throws an exception
  • whether it's an issue with how the model is added to the project
  • etc. etc.

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

2 participants