title: EntryPointNotFoundException: Unable to find an entry point named 'OrtGetApiBase' in DLL 'onnxruntime'
body: <p>I am trying to run an sklearn onnx model in C# 4.8 framework on Windows 10 Pro with VS 2019, I have used the following code using examples in:</p>
  <p><a href="https://towardsdatascience.com/deploy-sci-kit-learn-models-in-net-core-applications-90e24e572f64" rel="nofollow noreferrer">https://towardsdatascience.com/deploy-sci-kit-learn-models-in-net-core-applications-90e24e572f64</a></p>
  <p><a href="https://vkontech.com/making-predictions-in-c-with-a-pre-trained-tensorflow-model-via-onnx/" rel="nofollow noreferrer">https://vkontech.com/making-predictions-in-c-with-a-pre-trained-tensorflow-model-via-onnx/</a></p>
  <p>and</p>
  <p><a href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-use-automl-onnx-model-dotnet" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/machine-learning/how-to-use-automl-onnx-model-dotnet</a></p>
  <p>I have imported using nuget</p>
  <pre><code>Install-Package Microsoft.ML.OnnxRuntime -Version 1.9.0
  Install-Package Microsoft.ML.OnnxRuntime.Gpu -Version 1.9.0
  Install-Package Microsoft.ML.OnnxTransformer -Version 1.6.0
  Install-Package Microsoft.ML.OnnxRuntime.MKLML -Version 1.6.0
  Install-Package Microsoft.ML -Version 1.5.5
  </code></pre>
  <p>when i run this line of code:</p>
  <pre><code>InferenceSession session = new InferenceSession(modelPath);
  </code></pre>
  <p>I receive this error:</p>
  <p>System.TypeInitializationException: 'The type initializer for 'Microsoft.ML.OnnxRuntime.NativeMethods' threw an exception.'</p>
  <p>EntryPointNotFoundException: Unable to find an entry point named 'OrtGetApiBase' in DLL 'onnxruntime'.</p>
  <p>in:</p>
  <pre><code>public SessionOptions()
      : base(IntPtr.Zero, true)
  {
      NativeApiStatus.VerifySuccess(NativeMethods.OrtCreateSessionOptions(out handle));
  }
  </code></pre>