Hello!
We're having trouble reproducing your issue. We just ran this test program without any problems:
Can you think of anything you're doing that might be significantly different?
Also, the exception text you posted indicates TargetInvocationException, which should always have a non-null InnerException property. Can you examine that and tell us what you find?
Thanks!
We're having trouble reproducing your issue. We just ran this test program without any problems:
Module ConsoleTest Sub Main() Using engine AsNew Microsoft.ClearScript.Windows.VBScriptEngine engine.Execute("Public Sub Main() : Dim x : x = 5 : End Sub") engine.Script.Main() EndUsingEndSubEndModule
Also, the exception text you posted indicates TargetInvocationException, which should always have a non-null InnerException property. Can you examine that and tell us what you find?
Thanks!