Embedding IronPython - Can't add reference to System
I'm embedding IronPython in my C# application. For some reason I'm having trouble loading assemblies. Specifically, I want System.dll so I can have access to .NET classes like DateTime. If I try the line: _runtime.LoadAssembly(_runtime.Host.PlatformAdaptationLayer.LoadAssembly("System")); I get: could not load file or assembly 'System' If I explicitly type the path to C:/WINDOWS/Microsoft.NET/.../System.dll I get: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) So then I tried doing the import using clr inside the Python script: import clr clr.AddReference