<div dir="ltr">Hi,<br><br>I seem to remember some problems possibly related to this... those binaries you've found are quite old now. As a first set I would recommend checking out the latest source from github and building the pythonnet binaries yourself. It should be as simple as running "python setup.py install" (or bdist_wheel/bdist_egg to build the wheel/egg if you prefer).<div><br></div><div>The git repo is here: <a href="https://github.com/pythonnet/pythonnet/">https://github.com/pythonnet/pythonnet/</a></div><div>Or if you are using python 3 use this one: <a href="https://github.com/renshawbay/pythonnet">https://github.com/renshawbay/pythonnet</a></div><div><br></div><div>Best regards,</div><div>Tony<br><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 8, 2015 at 4:10 PM Brian Lloyd <<a href="mailto:brian.d.lloyd@gmail.com">brian.d.lloyd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You probably need to escape those backslashes, no? e.g. <br></div><div dir="ltr"><pre style="margin-top:0px;padding:5px;border:0px none;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px none;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;white-space:inherit"><span style="margin:0px;padding:0px;border:0px none;color:rgb(128,0,0)">'C:\\Program Files\\API\\Test.NET'</span><span style="margin:0px;padding:0px;border:0px none;color:rgb(0,0,0)"></span></code></pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 8, 2015 at 3:44 AM, Gianni Iannelli <span dir="ltr"><<a href="mailto:giannicristian@msn.com" target="_blank">giannicristian@msn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">Dear All,</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)"><br></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">I have a problem loading an external dll using Python through Python for .NET. I have tried different methodologis following stackoverflow and similar. I will try to summarize the situation and to describe all the steps that I've done.</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">I have a dll named for e.g. Test.NET.dll. I checked with dotPeek and I can see, clicking on it, x64 and .NET Framework v4.5. On my computer I have installed the .Net Framework 4.</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">I have also installed Python for .NET in different ways. I think that the best one is download the .whl from this website <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#pythonnet" target="_blank">http://www.lfd.uci.edu/~gohlke/pythonlibs/#pythonnet</a> . I have downloaded and installed: pythonnet‑2.0.0.dev1‑cp27‑none‑win_amd64.whl. I can imagine that it will works for .NET 4.0 since<em style="margin:0px;padding:0px;border:0px">Requires the Microsoft .NET Framework 4.0.</em></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)"><em style="margin:0px;padding:0px;border:0px"><br></em></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">Once I have installed everything, I can do these commands:</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)"><br></p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">import</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> clr
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">import</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">System</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">print</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">System</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Environmnet</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Version</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">print</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">System</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Environment</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Version</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">4.0</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">30319.34209</span></code></pre><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">It seems work. Then, I have tried to load my dll typing these commands:</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)"><br></p><pre style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">import</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> clr
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> dllpath</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> r</span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">'C:\Program Files\API\Test.NET'</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">>>></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> clr</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AddReference</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">dllpath</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">

</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Traceback</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">most recent call last</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">):</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
  </span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">File</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"<pyshell#20>"</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> line </span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">1</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">in</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"><</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">module</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">></span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
    clr</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AddReference</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">dllpath</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">FileNotFoundException</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">:</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Unable</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> to find assembly </span><span style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">'C:\Program Files\API\Test.NET'</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
   at </span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Python</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">Runtime</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">CLRModule</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">AddReference</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">String</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> name</span><span style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">)</span></code></pre><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">I have also tried to add '.dll' at the end of the path but nothing changed. Then, I have also tried different solutions as described in:</p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)"></p><ul><li><a href="http://stackoverflow.com/questions/14633695/how-to-install-python-for-net-on-windows" style="line-height:15.6000003814697px;font-family:Calibri,sans-serif;font-size:12pt" target="_blank">http://stackoverflow.com/questions/14633695/how-to-install-python-for-net-on-windows</a><span style="line-height:15.6000003814697px">,</span></li><li><span style="line-height:15.6000003814697px"><a href="http://stackoverflow.com/questions/13259617/python-for-net-unable-to-find-assembly-error" target="_blank">http://stackoverflow.com/questions/13259617/python-for-net-unable-to-find-assembly-error</a></span></li><li><span style="line-height:15.6000003814697px"><a href="https://github.com/geographika/PythonDotNet" target="_blank">https://github.com/geographika/PythonDotNet</a></span></li></ul><div><br></div><span style="line-height:15.6000003814697px">and much more.... Unfortunately, it doesn't work and I get different errors. I know that exists IronPython but I was trying to avoid to use it.</span><p></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)"><br></p><p style="margin-bottom:1em;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:15.6000003814697px;background-color:rgb(255,255,255)">Thanks for your help!</p>                                        </div></div>
<br>_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a><br></blockquote></div><br><br clear="all"><br></div><div class="gmail_extra">-- <br><div><div dir="ltr"><table cellpadding="2" cellspacing="0"><tbody><tr>
<td style="font-family:Verdana,Geneva,sans-serif;color:rgb(102,102,102);font-size:18px;vertical-align:middle">
<table cellpadding="2" cellspacing="0"><tbody><tr><td style="background-image:linear-gradient(rgb(64,113,183) 0%,rgb(33,58,99) 100%);font-family:'Book Antiqua',serif;color:rgb(255,255,255);font-size:18px;vertical-align:middle;padding:2px 4px;background-repeat:initial initial" bgcolor="#213a63"><font size="4"><font face="Book Antiqua">47</font></font></td>
<td style="font-family:Verdana,Geneva,sans-serif;color:rgb(102,102,102);font-size:18px;vertical-align:middle">
<font size="4"><font face="Verdana">Lining</font></font></td>
</tr>
</tbody>
</table>
<table cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td><font color="#213a63"><font size="2"><font face="Verdana"><b>Brian Lloyd, SVP Engineering</b></font></font></font></td>
</tr>
<tr>
<td><font color="#666"><font size="1"><font face="Verdana">Cloud Advisory and Development Services</font></font></font></td>
</tr>
<tr>
<td><font color="#666"><font size="1"><font face="Verdana">M <a value="+15408452975">+1.540.845.2975</a> | E <a href="mailto:brian.lloyd@47lining.com" target="_blank">brian.lloyd@47lining.com</a> | W <a href="http://www.47lining.com/" target="_blank">www.47lining.com</a></font></font></font></td>
</tr>
</tbody>
</table>



<font color="#959595"><font size="1"><font face="Verdana">This 
message and any attachments are confidential and intended solely for the
 individual(s) or entity to which it is addressed. If you are not the 
intended recipient, do not read, copy or distribute
 the email or any attachments. Please notify the sender immediately by 
return e-mail.</font></font></font></td>
</tr>
</tbody>
</table>


<table cellpadding="2" cellspacing="0"><tbody><tr>
<td><font color="#213a63"><font size="2"><font face="Verdana"><b><br></b></font></font></font></td>
</tr>
<tr>
<td><font color="#666"><font size="1"><font face="Verdana"><br></font></font></font></td>
</tr>
<tr>
<td><br></td></tr></tbody></table></div></div>
</div>
_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a></blockquote></div>