Can't load .NET 5.0 assemblies (ModuleNotFoundError)
See original GitHub issueEnvironment
- Pythonnet version: 2.5.2
- Python version: 3.8.9
- Operating System: Windows 10
- .NET Runtime: .NET 5.0
Details
-
Describe what you were trying to get done.
I’m trying to import a .NET 5.0 library into my Python project. It fails with ModuleNotFoundError error.
-
What commands did you run to trigger this issue? If you can provide a Here is my C# Code:
using System;
namespace MyNameSpace
{
public class Test
{
public String PrintTest()
{
return "TEST";
}
}
}
Here is my Python code:
import clr
clr.AddReference("neo-wrapper-library")
from MyNameSpace import Test
test = Test()
print(test.PrintTest())
It works fine if the class is packaged on a .NET Standard library. It fails with ModuleNotFoundError: No module named 'MyNameSpace'
if packaged on a .NET 5 library application
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Where did all the assemblies go ? .NET 5.0 error CS1069
The package gets installed under your user account's home directory, not in a system-wide folder requiring elevated user permissions to access ...
Read more >Cannot Load a .NET 5.0 Assembly on Build · Issue #6645
Describe the problem and the steps to reproduce it. I am building multi-target MSI assemblies. The build works find when targeting net472 ...
Read more >Troubleshoot .NET Framework targeting errors
To resolve the error, make sure that your application targets a .NET version that's compatible with the version that's targeted by the projects ......
Read more >NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >Error Loading .NET Assemblies in LabVIEW - NI - Support
When I try to load a .NET assembly using the Constructor Node VI in LabVIEW, I receive one of the following error messages:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can always install from master
It is supported in v3 previews.