I have a .NET Standard 2.0 class library that I'm trying to use from Python. The library has dependencies on some private and public NuGet packages.
I managed to install a recent dev version of pythonnet
from the artifact on appveyor and I can run the following import code:
import clr
import sys
sys.path.append(r'C:\....\My.Library\bin\Debug\netstandard2.0')
ref = clr.AddReference("My.Library")
The code above runs fine, but when I try to import from my modules namespace...
from My.Library import MyClass
# >>> ModuleNotFoundError: No module named 'My'
When I try to do ref.get_ExportedTypes()
, I get this:
System.IO.FileNotFoundException:
Die Datei oder Assembly "Google.Protobuf, Version=3.6.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604"
oder eine Abhängigkeit davon wurde nicht gefunden.
Das System kann die angegebene Datei nicht finden.
bei System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
bei System.Reflection.RuntimeAssembly.GetExportedTypes()
Essentially this is a FileNotFoundException about the NuGet dependency. What is the right way to structure my DLL files / to import it with NuGet dependencies?
thanks