Search code examples
.net-coredeep-learningwindows-7onnxonnxruntime

Failed to use OnnxRuntime on Windows 7


Here's an issue we are encountering when using OnnxRuntime on Windows 7. We have provided below the software environment of our machine for your reference.

Software Environment

  • Windows 10
  • Visual Studio 2022
  • dotnet 6.0
  • Microsoft.ML.OnnxRuntime 1.14.1 (distributed by NuGet)

While the project works on Windows 10, we have encountered an issue when attempting to move the release package to a Windows 7 machine. Specifically, the executable file is unable to load the onnxruntime.dll. The issue has been brought to our attention on GitHub, where we noticed the following comment: https://github.com/microsoft/onnxruntime/issues/5483

It was mentioned that the issue has been resolved in #4636, however, we still have not been able to successfully launch the program on Windows 7. We hope that you could assist us in finding a solution.

We have tried:

  • Copying the dll file from Windows 10 to the Windows 7 machine and attempting to register it
  • Compiling the ORT in Windows 7. While the compilation was successful, its unit tests failed due to the kernel32.dll
  • Using older versions of ORT

Solution

  • Problem solved after my mailing to a key developer from Microsoft.

    Solution: You just need to compile it yourself from source. The onnxruntime.dll in the Nuget package does not support Windows 7, and latest code starting from 1.15.0 does not support windows 7 even when compiled from source. So try to download the 1.14.1 code and compile onnxruntime.dll yourself.