title: Importing .NET Standard 2.0 class library with dependencies using Python.Net
body: <p>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.</p>
  
  <p>I managed to install a recent dev version of <code>pythonnet</code> from the <a href="https://ci.appveyor.com/project/pythonnet/pythonnet/branch/master/job/cbccvx6vu92r7alx/artifacts" rel="nofollow noreferrer">artifact on appveyor</a> and I can run the following import code:</p>
  
  <pre><code>import clr
  import sys
  sys.path.append(r'C:\....\My.Library\bin\Debug\netstandard2.0')
  ref = clr.AddReference("My.Library")
  </code></pre>
  
  <p>The code above runs fine, but when I try to import from my modules namespace...</p>
  
  <pre><code>from My.Library import MyClass
  # &gt;&gt;&gt; ModuleNotFoundError: No module named 'My'
  </code></pre>
  
  <p>When I try to do <code>ref.get_ExportedTypes()</code>, I get this:</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>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?</p>
  
  <p>thanks</p>