diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c03ddb4f..3e58386e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: strategy: matrix: os: ['ubuntu-latest', 'windows-latest'] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.x'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] dotnet-version: ['8.0.x'] dist: [whl, sdist] uses: ./.github/workflows/e2e.yml diff --git a/src/data_factory_testing_framework/_pythonnet/__init__.py b/src/data_factory_testing_framework/_pythonnet/__init__.py index 5986726b..65e29f99 100644 --- a/src/data_factory_testing_framework/_pythonnet/__init__.py +++ b/src/data_factory_testing_framework/_pythonnet/__init__.py @@ -10,9 +10,11 @@ def load_dotnet_assemblies() -> None: # Load the .NET assemblies for dll in (Path(__file__).parent / "bin").glob("**/*.dll"): - dll = os.path.abspath(dll) + # Pass the path without the ".dll" suffix so pythonnet probes and loads ".dll" directly. + # With the suffix, pythonnet 3.0.x on .NET 9+ parses the path as an assembly name and fails to load it. + assembly_path = os.path.splitext(os.path.abspath(dll))[0] try: - clr.AddReference(dll) + clr.AddReference(assembly_path) except Exception: pass