How about building the ONNX Runtime source code? You can run ONNX Runtime without relying on WinML or the .NET framework.
For your information - https://onnxruntime.ai/docs/build/inferencing.html