public Assembly Compile(string name) { var meta = GetInstalledPlugins().FirstOrDefault(p => p.Name == name); if (meta == null) { throw new PluginNotFoundException(name); } var pluginDir = Path.Combine(NebulaConfig.PluginDirectory, meta.Name); var pluginFiles = new List <string>(); var assemblyFile = Path.Combine(pluginDir, $"{meta.Name}.dll"); _fileUtil.GenerateFileList(pluginDir, pluginFiles, ".cs", (f) => f); return(_compilationService.CompileLocal(meta.Name, assemblyFile, pluginFiles.ToArray())); }