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

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>