title: Python CLR Module with C# DLLs - AddReference works, import doesn't
body: <p>This question is related to sensible data that I cannot share, but the question is pretty simple. I'm working on PyCharm 2017.1.2, python 2.7.13.</p>
  
  <p>I have a file in a specific format (kind of an encrypted XML, unparsable), that needs to be converted into Excel to modify some values and then export it back to this original format. For some security reasons, I just cannot go around this conversion. All good, I have an Excel add-in that I can use for this, inside two C# DLLs, that does 'import' into the Excel format and 'export' it back to the weird XML.</p>
  
  <p>I cannot use IronPython either because the software I'm designing uses library IronPython just can't manage, so I'm stuck with good old Python 2.7.</p>
  
  <p>I'm currently using the clr module from pythonnet to import the DLLs into my software. The import code (not sensible) looks like this :</p>
  
  <pre><code>import clr
  import sys
  
  sys.path.append('C:/My/Path/To/The/DLLs/Folder')
  clr.AddReference('Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c')
  clr.AddReference('My.ClassLib.DLL')
  clr.AddReference('My.ExcelImportExport.DLL')
  
  import Microsoft.Office.Interop.Excel as Excel
  try:
      from My.ClassLib.DLL import XMLParser
      import My.ExcelImportExport.DLL
      from My.ExcelImportExport.DLL import DeviceSettingsUtility
  except Exception, e:
      print unicode(e)
  </code></pre>
  
  <p>Both DLLs I'm working with are located in the same folder. CLR has no problem adding the DLLs reference. </p>
  
  <p>What is weird : everything works fine with the <code>'My.ClassLib.DLL'</code> : I can access its classes and methods without any issues.
  But as soon as I try <code>import My.ExcelImportExport.DLL</code> or the line after, I've got an <code>ImportError: No module named My.ExcelImportExport.DLL</code>. When, after adding reference with clr, I list all the assemblies, I see both <code>My.ClassLib.DLL</code> and <code>My.ExcelImportExport.DLL</code>, so the problem doesn't come from here. The problem as to come from the <code>My.ExcelImportExport.DLL</code>.</p>
  
  <p>I've looked both DLLs with a decompiler and haven't found anything that makes the ClassLib.DLL work and would explain why the other one doesn't.</p>
  
  <p>Finally, my question : What needs to be in the DLL (C# code) for clr to be able to import it?</p>