diff --git a/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs b/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs index 4c53b98e3d9f1..86d7ff52cdf09 100644 --- a/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs +++ b/csharp/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs @@ -60,7 +60,9 @@ public PythonNet() public void Dispose() { +#if !NET5_0_OR_GREATER PythonEngine.Shutdown(); +#endif } }