Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: vbs error

$
0
0
Namespace conflicts with 'HostType' at 'System.Internal.HandleCollector'
 Engine = new Microsoft.ClearScript.Windows.VBScriptEngine();
             Engine.AddHostObject("host", new HostFunctions());
             var typeCollection = new HostTypeCollection("mscorlib", "System", "System.Core", "System.Windows.Forms"); 
             Engine.AddHostObject("clr", typeCollection);
             Engine.Execute("var System = clr.System;");
             Engine.AddHostObject("require", new Action<string>(s => Engine.Execute(File.ReadAllText(Application.StartupPath + "\\Content\\" + s))));
             Engine.AddHostObject("eval", new Action<string>(s => Engine.Execute(s)));
             Engine.AddHostObject("xHost", new ExtendedHostFunctions());
             Engine.Execute(src);

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images