Skip to content
\n

The reported versions are as expected:

\n

before

\n
dotnet --version\n8.0.122\ndotnet --list-sdks\n8.0.122 [/usr/lib/dotnet/sdk]\ndotnet --list-runtimes\nMicrosoft.AspNetCore.App 8.0.22 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]\nMicrosoft.NETCore.App 8.0.22 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]\n
\n

after

\n
dotnet --version\n>>> 10.0.100\ndotnet --list-sdks\n>>> 10.0.100 [/usr/lib/dotnet/sdk]\ndotnet --list-runtimes\n>>> Microsoft.AspNetCore.App 10.0.0 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]\n>>> Microsoft.NETCore.App 10.0.0 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]\n
\n

The Dockerfile is based on mambaorg/micromamba:2-ubuntu24.04.

\n

The full traceback is this:

\n
10.0.100\nPython 3.13.11\nYou must install or update .NET to run this application.\nApp: /opt/conda/bin/python3.13\nArchitecture: x64\nFramework: 'Microsoft.NETCore.App', version '10..0' (x64)\n.NET location: /usr/lib/dotnet\nThe following frameworks were found:\n  10.0.0 at [/usr/lib/dotnet/shared/Microsoft.NETCore.App]\nLearn more:\nhttps://aka.ms/dotnet/app-launch-failed\nTo install missing framework, download:\nhttps://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=10..0&arch=x64&rid=ubuntu.24.04-x64&os=ubuntu.24.04\nTraceback (most recent call last):\n  File \"/opt/conda/lib/python3.13/site-packages/pythonnet/__init__.py\", line 77, in _create_runtime_from_spec\n    return clr_loader.get_coreclr(**params)\n           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^\n  File \"/opt/conda/lib/python3.13/site-packages/clr_loader/__init__.py\", line 158, in get_coreclr\n    impl = DotnetCoreRuntime(runtime_config=runtime_config, dotnet_root=dotnet_root)\n  File \"/opt/conda/lib/python3.13/site-packages/clr_loader/hostfxr.py\", line 35, in __init__\n    self._handle = _get_handle_for_runtime_config(\n                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n        self._dll, self._dotnet_root, runtime_config\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/opt/conda/lib/python3.13/site-packages/clr_loader/hostfxr.py\", line 159, in _get_handle_for_runtime_config\n    check_result(res)\n    ~~~~~~~~~~~~^^^^^\n  File \"/opt/conda/lib/python3.13/site-packages/clr_loader/util/__init__.py\", line 42, in check_result\n    raise error\nclr_loader.util.clr_error.ClrError: 0x80008096: FrameworkMissingFailure\nThe above exception was the direct cause of the following exception:\nTraceback (most recent call last):\n  File \"/run/test.py\", line 2, in <module>\n    load(\"coreclr\")\n    ~~~~^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.13/site-packages/pythonnet/__init__.py\", line 135, in load\n    set_runtime(runtime, **params)\n    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^\n  File \"/opt/conda/lib/python3.13/site-packages/pythonnet/__init__.py\", line 29, in set_runtime\n    runtime = _create_runtime_from_spec(runtime, params)\n  File \"/opt/conda/lib/python3.13/site-packages/pythonnet/__init__.py\", line 90, in _create_runtime_from_spec\n    raise RuntimeError(\n    ...<2 lines>...\n    ) from exc\nRuntimeError: Failed to create a .NET runtime (coreclr) using the\n                parameters {}.\n
\n

Any ideas what might be the issue?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Can reproduce this on pythonnet 3.0.5 and clr-loader 0.2.9 (latest versions as of now). This PR should fix the issue

","upvoteCount":0,"url":"https://github.com/pythonnet/pythonnet/discussions/2676#discussioncomment-15399559"}}}
Discussion options

You must be logged in to vote

Can reproduce this on pythonnet 3.0.5 and clr-loader 0.2.9 (latest versions as of now). This PR should fix the issue

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@michaelosthege
Comment options

@Parnassius
Comment options

Answer selected by michaelosthege
@michaelosthege
Comment options

@filmor
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants