I tried to use the Saltarelle C# Compiler on a default Console Project in Mono
using System;
namespace SaltarelleConsoleTest
{
class MainClass
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello World!");
}
}
}
but when I try to compile it with the terminal command
mono lib/Saltarelle.Compiler/tools/sc.exe -reference:lib/Saltarelle.Runtime/tools/Assemblies/mscorlib.dll Main.cs -outscript:bin/main.js
this error occurs:
Unhandled Exception: System.TypeLoadException: Could not load type 'Saltarelle.Compiler.Program' from assembly 'sc, Version=1.5.0.0, Culture=neutral, PublicKeyToken=a4048e8fcc593f14'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Saltarelle.Compiler.Program' from assembly 'sc, Version=1.5.0.0, Culture=neutral, PublicKeyToken=a4048e8fcc593f14'.
What I am doing wrong? Has anyone successfully set up Mono-Develop with Saltarelle (or any other C# to Javascript Compiler like Script#)
you must:
mono --runtime=v4.0.30319 lib/Saltarelle.Compiler/tools/sc.exe -reference:lib/Saltarelle.Runtime/tools/Assemblies/mscorlib.dll Main.cs -outscript:bin/main.js