コード例 #1
0
        private void CompileGeneratedCode(string projectPath, IEnumerable <string> files, string language)
        {
            List <string> referenceAssemblies = MsBuildHelper.GetReferenceAssemblies(projectPath);

            if (language == "C#")
            {
                CompilerHelper.CompileCSharpSourceFromFiles(files, referenceAssemblies, documentationFile: null);
            }
            else
            {
                CompilerHelper.CompileVisualBasicSourceFromFiles(files, referenceAssemblies, "TheRootNamespace", documentationFile: null);
            }
        }