I am a new user of Visual Studio, and I am trying to figure out how to load a C# class library built as part of a solution from an IronPython project in the same solution.
Basically, I am trying to do the scenario in How to debug a class library in Vis开发者_高级运维ual Studio but using an IronPython script instead of the console application.
Normally outside a solution I would use:
import clr
clr.AddReferenceToFile(fname)
What should I put in for fname
?
You could configure the SearchPath
directory
and then:
clr.AddReference("NameOfAssembly")
or you could also specify the full path:
clr.AddReferenceToFileAndPath(@"c:\work\someproject\bin\debug\NameOfAssembly.dll")
Here's a blog post describing the different functions for loading assemblies in IronPython.
精彩评论