protected override void GenerateCodes() { Log((object)"Generating..."); var recordpath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, JennyPropertyPath); LogError("recordpath " + recordpath); var text = File.ReadAllText(recordpath); var preference = new Preferences(recordpath, recordpath); ICodeGenerationPlugin[] instances = CodeGeneratorUtil.LoadFromPlugins(preference); CodeGeneratorConfig andConfigure = preference.CreateAndConfigure <CodeGeneratorConfig>(); AssemblyResolver assemblyResolver = new AssemblyResolver(false, andConfigure.searchPaths); foreach (string plugin in andConfigure.plugins) { Log("load plugin " + plugin); assemblyResolver.Load(plugin); } DesperateDevs.CodeGeneration.CodeGenerator.CodeGenerator codeGenerator = CodeGeneratorFromPreferences(preference); codeGenerator.OnProgress += (GeneratorProgress)((title, info, progress) => { Log("progress " + (progress)); }); CodeGenFile[] codeGenFileArray1 = new CodeGenFile[0]; CodeGenFile[] codeGenFileArray2; try { codeGenFileArray2 = codeGenerator.Generate(); } catch (Exception ex) { codeGenFileArray1 = new CodeGenFile[0]; codeGenFileArray2 = new CodeGenFile[0]; LogError("Error" + ex.Message + ex.StackTrace); } UpdateOutputProjectFile(); LogGenInfo(codeGenFileArray2, codeGenFileArray1); }