Skip to content

Question: Has the way Python imports a .NET6 library changed? #1951

Description

@DareDevilDenis

To import a .NET6 library, my understanding is that the steps in Python.Net 3.0 are:

from clr_loader import get_coreclr
from pythonnet import set_runtime

runtime = get_coreclr('MyApplication.runtimeconfig.json')
set_runtime(runtime)

However, with clr-loader 0.2.3 (released 5 days ago), the call to get_coreclr with one argument fails with exception:
TypeError: get_coreclr() takes 0 positional arguments but 1 was given

I've raised this issue in clr-loader: pythonnet/clr-loader#35

However, I was wondering if the change to the get_coreclr() API might be intentional, meaning that the recommended steps to import a .NET6 library has changed. Can anyone please confirm?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions