MissingMethodException was unhandled by user code

Feb 26, 2008 at 4:30 PM
The simplest possible chunk of code I could think of is failing in IronPython Studio:

import System

def add(x,y):
return x + y

print add(1,2)

When I run, i get the following message:

MissingMethodException was unhandled by user code
Method not found: 'Void IronPython.Runtime.Operations.Ops.UpdateTraceBack(IronPython.Runtime.Calls.ICallerContext, System.String, Int32, System.String, Boolean ByRef)'.

Stack Trace:
at Program.add$f5(Object x, Object y)
at IronPython.Runtime.Calls.Function2.Call(ICallerContext context, Object arg0, Object arg1)
at IronPython.Runtime.Operations.Ops.CallWithContext(ICallerContext context, Object func, Object arg0, Object arg1)
at Program.Initialize() in Program.py:line 6
at IronPython.Runtime.Operations.Ops.ExecuteCompiled(InitializeModule init)
//---End Exception---

I know the code works - aside from the fact it's so simple - because I'm able run it using ipy.exe directly. Anyone have any suggestions?
Feb 27, 2008 at 12:46 AM
I just created a console application in IPS with that same code and it worked just fine. The same code minus "import System" works as well.
Feb 27, 2008 at 1:42 PM
Edited Feb 27, 2008 at 1:45 PM
Thanks for the response, Brian. I'm very much thinking this has more to do with my installation than my code. The more I consider the exception message being thrown, the more it sounds like there's a missing or out-of-date DLL somewhere. Anyone have suggestions on where to look? I've poked around various settings within IPS, but haven't found anything thus far.

Also, if it's helpful, the IronPython console works just fine with the above code.

Sorry about the import System. It was a relic from my various IronPython experiements
Feb 27, 2008 at 8:44 PM
I've got IPS installed on two systems: A VPC 2007 VM running Windows XP and a tablet running Windows XP Tablet. I'm having the same issue on my VM, but it seems to be working fine on my tablet. After doing a re-install of IPS, I'm thinking that there indeed is some sort of library issue.
Feb 28, 2008 at 12:57 AM
Reinstall of IPS didn't work. I'm wondering if there is a conflict coming from a version of VS or one of the VS SDKs. I'm going to try to put this on a VM and see how it goes. Probably should have done that in the first place.
Feb 28, 2008 at 5:14 AM
Edited Feb 28, 2008 at 2:09 PM
Sorry, my previous message wasn't clear: a reinstall of IPS didn't work for me either.

In comparing my VM to my tablet, the only difference is that I've installed the VS SDK and ASP.NET futures. Otherwise, both have similar software setups, (VS 2005, .NET 3.5).
Mar 9, 2008 at 2:09 AM
I finally got around to getting IPS running on a virtual machine. Works well. The machine was absolutely clean, no visual studio of any sort on it. I'm curious as to what is causing the conflict