2

I recently discovered you can compile JScript into console apps using a built in tool in the .NET framework called jsc. It is already installed on my computer, and other windows computers which have .NET.

I want to know if the final compiled exe is dependent on .NET. Also, is it completely portable. Can I build an app on my machine, and then distribute it, and expect it to work on everyone else's machine?

What technical details would I need to put in the release notes? Maybe that it depends on .NET etc...

Billy Moon
  • 57,113
  • 24
  • 136
  • 237
  • I can tell you yes, the compiled exe is definitely dependent on the .NET framework being installed on the target machine. If it is installed on their machines, there is no reason to believe it will not work on their machine. JSC compiles to the same MSIL that C#, VB.NET, etc. compiles to. FYI: I've read that JScript.NET was more-or-less abandoned by MS and that it's not included in VS2010/etc. templates seems further evidence. I haven't investigated this much further. – aikeru May 01 '12 at 20:38
  • So one point that I still need clarification on... if I write something in javascript and compile it with jsc on my machine, and then windows dropped support for jsc entirely, would the program still run on existing and future machines with .net installed? – Billy Moon May 02 '12 at 08:24
  • 1
    p.s. you should write this as an answer, with a few references. I would vote for it, and other people might find it a useful answer too ,~) – Billy Moon May 02 '12 at 08:25

1 Answers1

3

OK I'll put it into an answer format then :)

Concerning the JScript compiler (jsc):

  • The compiled exe will be dependent on .NET being installed on the target machine, just as any other .NET executable concerning versions, etc.
  • JScript.NET is a separate product from JScript (Microsoft's implementation of ECMAScript), so not everything will work in jsc that might work in the browser or in Windows Scripting Host.
  • I've read that JScript.NET was more-or-less abandoned by MS

Dynamic Language Runtime Discussion on JScript.NET

JScript.NET abandoned mentioned in IronJS article

SO question concerning JScript.NET

ie: it doesn't know anything about generics, and won't let you reference generic types, or call generic methods. In terms of implementation, it uses reflection heavily with no additional optimizing layers (like DLR), and so is rather slower than e.g. IronPython.

You can also make console applications from other languages.

Community
  • 1
  • 1
aikeru
  • 3,773
  • 3
  • 33
  • 48