문제

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

도움이 되었습니까?

해결책

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")

다른 팁

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

import clr
clr.AddReferenceToFileAndPath("SharpSvn.dll")

You need to go to the IronPython solution and right-click on Search path and Add a new search path. Once this is done the folder your DLL is in will be in the search path like the screen shot

Search Path http://www.freeimagehosting.net/uploads/aef2b4a74f.png

Once that is done you need to do

import clr
clr.AddReference("SharpSvn.dll")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top