Adding reference to .net assembly which has dots in name and namespace
<p>I am trying to refer to assembly which has dots in the namespace.</p>

<pre class="lang-python prettyprint-override"><code>sys.path.append(assemblyPath)

clr.FindAssembly(r"isc.Eng.Hov")
clr.AddReference(r"isc.Eng.Hov")

print 'isc.Eng.Hov' in clr.ListAssemblies(False)

from isc.Eng.Hov import *
</code></pre>

<p>Interpreter raises an error:</p>

<pre><code>Traceback (most recent call last):
True
  File "/mnt/86f8c6c8-9099-4f32-be68-486a12918546/GoogleDrive/__BACKLOG/RMK_API_LIB/rmkSuppliersDLLswrappers/scr/Hoval/__phex_hoval_dllwrapper.py", line 14, in &lt;module&gt;
    from isc.Eng.Hov import *
ImportError: No module named isc.Eng.Hov
</code></pre>

<p>How to troubleshoot?</p>

<p>the solution was to use <a href="http://ilspy.net/" rel="nofollow">ILSPY</a> to investigate the DLL and find dependencies (right click recursively for each DLL and click on add dependencies). Then I copied all the dependencies to the same folder where the main DLL was. After that, I ran:</p>

<pre class="lang-python prettyprint-override"><code>print [a for a in clr.ListAssemblies(False)
</code></pre>

<p>and get the list of dependencies which are actually involved:</p>

<pre class="lang-python prettyprint-override"><code>u'isc.Eng.Hov', u'Microsoft.VisualBasic', u'System.Windows.Forms', u'System.Drawing', u'Accessibility'
</code></pre>

<p>and left them in the folder.
After doing so the part of code:</p>

<pre class="lang-python prettyprint-override"><code>sys.path.append(assemblyPath)

clr.AddReference("isc.Eng.Hov")

import isc.Eng.Hov as isk
from isk import *
</code></pre>

<p>started work.</p>

<p>Thank you all, especially @denfromufa for help!</p>

python .net .net-assembly python.net