예제 #1
0
        public static void CompileProject(string projectFile)
        {
            CSharpProject project = CSharpProject.Create(projectFile);

            CSharpCompiler compiler = new CSharpCompiler();

            compiler.LanguageVersion         = project.LanguageVersion;
            compiler.OutputKind              = project.OutputKind;
            compiler.OptimizationLevel       = project.OptimizationLevel;
            compiler.Platform                = project.Platform;
            compiler.GeneralDiagnosticOption = project.GeneralDiagnosticOption;
            compiler.WarningLevel            = project.WarningLevel;

            compiler.AssemblyName        = project.AssemblyName;
            compiler.OutputPath          = project.OutputPath;
            compiler.PdbPath             = project.PdbPath;
            compiler.Win32ResourceFile   = project.Win32ResourceFile;
            compiler.PreprocessorSymbols = project.PreprocessorSymbols;
            compiler.SourceFiles         = project.SourceFiles;
            compiler.ResourceFiles       = project.ResourceFiles;
            compiler.AssembliesFiles     = project.AssembliesFiles;
            compiler.Compile();
        }
예제 #2
0
 public static void TraceProject(string projectFile)
 {
     CSharpProject.Create(projectFile).Trace();
 }