Run JScript.Net executable on Compact Framework




I have a question regarding to JScript.Net on the Compact.Net

On the NET 3.5 desktop platform I made a JScript file which I compiled
to a executable (using the jsc compiler). Now I want to run this
executable on a mobile device. Therefore I compiled the JScript file
with the jsc command using the 3.5 librarys. This works
fine and an executable is created.

However, once I try to execute this JScript file on my mobile device
an error is thrown: the Microsoft.JScript namespace is not found.
According to my opinion this is a strange error: I am not using
JScript directly on the mobile device but a compiled .NET executable.
Is this not supposed to work because it's using .NET's intermediate

I will summarize my story with the central question: Is there a way to
use compiled JScripts (could be dll's or executables) on mobile
devices? Or, are there any workarounds to solve this problem?

Thanks in advance,

Jan Meskens

Paul G. Tobey [eMVP]

There's probably a namespace with some stuff in it that is specific to
JScript.NET, as there is for VB. You don't have it, because the .NET CF
doesn't have it. Thus, the error.

JScript.NET is not supported. You might conceivably get it to work now, but
find that some one line of new and valid code that you add tomorrow crashes
the run-time (generates an instruction that the .NET CF run-time doesn't
handle, etc.) I would not do this. You'd be better off to rewrite in VB or
C#; you might even find a source code translator that would work.

Paul T.

Chris Tacke, eMVP

Why is that strange? If your executable loads something from the
Microsoft.JScript assembly, it's going to need to find that, and it doesn't
exist in the CF. Compiling doesn't take all referenced assemblies and put
them into your app's assembly.


Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question