title: Can JScript.NET be used to script a .NET application?
body: <p>Since MS <a href="https://stackoverflow.com/questions/775339/where-can-you-download-managed-jscript-for-the-dlr/886173#886173">appears to have killed Managed JavaScript in the latest DLR</a> for both server-side (ASP.NET Futures) and client-side (Silverlight), has anyone successfully used non-obsolete APIs to allow scripting of their application objects with JScript.NET and/or can explain how to do so?  A Mono/JScript solution might also be acceptable, if it is stable and meets the requriements below.</p>
  
  <p>We are interested in upgrading off of a script host which uses the Microsoft JScript engine and ActiveScript APIs to something with more performance and easier extensibility.  We have over 16,000 server-side scripts weighing in at over 42MB of source, so rewriting into another scripting language is out of the question.</p>
  
  <p>Our specific requirements are:</p>
  
  <ul>
  <li>Noteably better performance than the Microsoft JScript (ActiveScript) engine
  
  <ul>
  <li>Better runtime performance and/or</li>
  <li>Retention of pre-parsed or compiled scripts (don't reparse on every run)</li>
  <li>Lower or equal memory consumption</li>
  </ul></li>
  <li>Full ECMA-262 ECMAScript compatibility
  
  <ul>
  <li>a little porting can be tolerated</li>
  </ul></li>
  <li>Injection of custom objects into the script namespace
  
  <ul>
  <li>.NET objects (not a hard requirement)</li>
  <li>COM objects or COM objects wrapped in .NET</li>
  </ul></li>
  <li>Instantiation of COM objects from Script
  
  <ul>
  <li>à la "new ActiveXObject(progid)"</li>
  <li>Low priority given the preceeding</li>
  </ul></li>
  <li>Include files
  
  <ul>
  <li>Pre-loading of "helper scripts" into a script execution context</li>
  <li>An "include" function or statement (easy to create, given the above)</li>
  </ul></li>
  <li>Support for code at global-scope
  
  <ul>
  <li>Execution of code the global scope</li>
  <li>Retention of values initialized at global scope</li>
  <li>Extraction of values from the global scope</li>
  <li>Injection and replacement of values at the global scope</li>
  </ul></li>
  <li>Calling of script-defined functions
  
  <ul>
  <li>with parameters</li>
  <li>and with access to the previously initialized global scope</li>
  </ul></li>
  <li>Source-level debugging</li>
  <li>Commercial or Open Source Support</li>
  <li>Non-obsolete APIs</li>
  </ul>