JScript Eval function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CGuy

    #1

    JScript Eval function

    Hi,

    I need to use the Eval function of JScript in my C# code. I was thinking
    that I could write this as a seperate JScript.NET file, compile it as a .NET
    module and then later link it with my C# .NET module using AL to produce my
    final asembly. But the JScript.NET compiler does not have an option to
    compile code into a .NET module (it lacks the /t:module compiler option).

    How do I go about doing this? Is it possible to use classes in the
    Microsoft.JScri pt namespace to achieve the same thing?

    Or, is there a C# equiv way to do this?

    CGuy



  • Shawn

    #2
    Re: JScript Eval function

    there is a /target:library option

    jsc /out:some.dll /target:library some.js

    "CGuy" <cguy@csharp.ne t> дÈëÓʼþ
    news:ealkpjEWDH A.1180@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Hi,
    >
    > I need to use the Eval function of JScript in my C# code. I was[/color]
    thinking[color=blue]
    > that I could write this as a seperate JScript.NET file, compile it as a[/color]
    ..NET[color=blue]
    > module and then later link it with my C# .NET module using AL to produce[/color]
    my[color=blue]
    > final asembly. But the JScript.NET compiler does not have an option to
    > compile code into a .NET module (it lacks the /t:module compiler option).
    >
    > How do I go about doing this? Is it possible to use classes in the
    > Microsoft.JScri pt namespace to achieve the same thing?
    >
    > Or, is there a C# equiv way to do this?
    >
    > CGuy
    >
    >
    >[/color]


    Comment

    • Shawn

      #3
      Re: JScript Eval function

      there is a /target:library option

      jsc /out:some.dll /target:library some.js

      "CGuy" <cguy@csharp.ne t> дÈëÓʼþ
      news:ealkpjEWDH A.1180@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Hi,
      >
      > I need to use the Eval function of JScript in my C# code. I was[/color]
      thinking[color=blue]
      > that I could write this as a seperate JScript.NET file, compile it as a[/color]
      ..NET[color=blue]
      > module and then later link it with my C# .NET module using AL to produce[/color]
      my[color=blue]
      > final asembly. But the JScript.NET compiler does not have an option to
      > compile code into a .NET module (it lacks the /t:module compiler option).
      >
      > How do I go about doing this? Is it possible to use classes in the
      > Microsoft.JScri pt namespace to achieve the same thing?
      >
      > Or, is there a C# equiv way to do this?
      >
      > CGuy
      >
      >
      >[/color]


      Comment

      Working...