-
Notifications
You must be signed in to change notification settings - Fork 751
pythonnet fails to load netstandard2.1 library #1151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AFAIK .NET Framework is not .NET Standard 2.1 compatible. As such, only a .NET Core build of Python.NET will be able to load a .NET Standard 2.1 library. This is being worked on, but it will take a while to land it in master. |
I currently use this fork of PythonNet for my .Net Core apps. This is built against .NET Standard 2.0. Perhaps our PythonNet gurus are waiting for .NET 5? |
Thanks @QuickWire for pointing that out, that's actually quite interesting and good to know it exists. However, unless I'm mistaken, I don't think it will resolve my problem because I need the opposite direction (python -> .net, not .net -> python). |
.NET Core support is now merged, docs will follow soon (#984 contains an example). |
Environment
Details
If I compile a library using <TargetFramework>netstandard2.1</TargetFramework>, then trying to import any symbols from it fails. In contrast, when I compile using <TargetFramework>netstandard2.0</TargetFramework>, with the otherwise identical library, everything works fine.
Are there any plans to support netstandard2.1? What is required to get that working? I'm using the most recent master-2166 build from AppVeyor.
Apologies if this was raised already, I saw some separate discussions on other topics such as .net core, but none mentioning netstandard libraries.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
ModuleNotFoundError: No module named My.Library.Name
The text was updated successfully, but these errors were encountered: