Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add .dll reference to ironpython VS2010 project?

I have a sharpsvn .net library i want to use in ironpython project. Library is shipped as a .ney .dll file. For C# projects i just add this file to project "Reference" section and after that i can use a library:

alt text http://j.mp/8Y3MfL

But for IronPython, the "Reference" section opens very strange window i can't figure out how to add .dll reference to it. Is it any way to reference .net .dll library in IronPython other than GAC?

alt text http://j.mp/az6XLW

like image 571
grigoryvp Avatar asked Jan 22 '23 15:01

grigoryvp


2 Answers

Add Reference dialog should not be used. Instead you can

import clr
clr.AddReferenceToFileAndPath(...) ' with path

or configure SearchPath directory and use AddReference

import clr
clr.AddReference("SharpSvn")
like image 82
desco Avatar answered Feb 03 '23 13:02

desco


You add them in the script itself, something like this.

import clr
clr.AddReferenceToFileAndPath("SharpSvn.dll")
like image 31
Gary Avatar answered Feb 03 '23 15:02

Gary