Exemple #1
0
        internal void GenerateAssemblyAndExit(GenerateInfo info)
        {
            System.IO.StreamReader streamReader = new System.IO.StreamReader(info.source);
            string source = streamReader.ReadToEnd();

            streamReader.Close();

            js.CompileToFile(source, info.destination, info.name);

            // Fix reference to mscorlib
            string fullName = string.Format("{0}/{1}.dll", info.destination, info.name);
            var    assembly = new NETAssembly.NETAssembly();

            assembly.Load(fullName);
            assembly.SetVersionForReference(
                "mscorlib",
                new byte[] { 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00 }, // 2.0.5.0
                new byte[] { 0x7c, 0xec, 0x85, 0xd7, 0xbe, 0xa7, 0x79, 0x8e }
                );
            this.Exit();
        }