From f71b6944bffa8deccc63206ce0b88c2ffc34a063 Mon Sep 17 00:00:00 2001 From: RandySheriffH <48490400+RandySheriffH@users.noreply.github.com> Date: Mon, 14 Aug 2023 06:04:37 -0700 Subject: [PATCH] Fix nuget pipeline (#17110) Fix nuget pipeline by correcting the calling convention on c# delegate. --------- Co-authored-by: Randy Shuai --- csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs b/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs index c35c5f9111a4a..b21d036f61be9 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs +++ b/csharp/src/Microsoft.ML.OnnxRuntime/InferenceSession.shared.cs @@ -1060,6 +1060,7 @@ private static void OrtCallback(IntPtr userData, IntPtr[] ouputs, uint numOutput } } + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] private delegate void OrtCallbackDelegate(IntPtr userData, IntPtr[] outputs, uint numOutputs, IntPtr status); private static OrtCallbackDelegate ortCallback = new OrtCallbackDelegate(OrtCallback);