Announcement

Collapse
No announcement yet.

Converting single C# file to JavaScript

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting single C# file to JavaScript

    Hello guys,

    is it possible to compile single file?

    Here is what I want to do:
    • In web form user will write C# code
    • He will send it to server
    • On server I need to convert it to Javascript and return it back to user
    • Client will run this code
    I researched that compiler requires .csproj file.

    Here is what I plan to do:
    • After receiving users C# code I will create programatically new project.
    • Then run bridge.exe on this project and the generated javascript I will send back to user.
    My problem is that I am not able to run bridge.exe on my project. Is there anything I need to know? Can you show me example .csproj file? Do I have to run bridge.exe with some extra parameters? I am getting errors (you can see it in picture down there), even if it is library created in Visual Studio 2015. Thanks

    Click image for larger version

Name:	helpMePlease.png
Views:	1
Size:	98.9 KB
ID:	4190

  • #2
    Hi Topiker,

    Have you tried to make a bridge.net solution "manually" ( .vsix solution template ) ? (see http://bridge.net/download/ )
    Then you can use that solution and the project as templates and use:

    msbuild.exe SolutionFile.sln /t:Build/p:Configuration=Release;Platform=Win32
    Dont know if it is any help?

    Succes.




    Comment

    Working...
    X