private void LoadScreensFromTemplate(string template) { if (File.Exists(template) == false) { #if DEBUG string path = Slyce.Common.RelativePaths.GetFullPath(System.Reflection.Assembly.GetExecutingAssembly().Location, @"..\..\..\..\ArchAngel.Templates\NHibernate\Template\NHibernate.AAT.DLL"); if (File.Exists(path)) { template = path; } else { throw new Exception("Could not find the Template file at " + template); } #else throw new Exception("Could not find the Template file at " + template); #endif } Assembly assembly = Assembly.LoadFile(template); TemplateLoader loader = new TemplateLoader(assembly); var screens = loader.CallCustomNewProjectScreensFunction(); if (screens.Count > 0) { AddScreens(screens); } }