public UnloadProject ( Microsoft.Build.BuildEngine.Project project ) : void | ||
project | Microsoft.Build.BuildEngine.Project | |
Результат | void |
void MsVisitProjects(VisitProject visitor) { Engine e = new Engine(RuntimeEnvironment.GetRuntimeDirectory()); if(e.GetType().Assembly.GetName().Version.Major == 2) try { e.GlobalProperties.SetProperty("MSBuildToolsPath", RuntimeEnvironment.GetRuntimeDirectory()); } catch { } foreach (FileInfo file in _projects) { Project prj = new Project(e); try { prj.Load(file.FullName); } catch (Exception ex) { Console.Error.WriteLine("Unable to open project: {0}", file); Log.Verbose(ex.ToString()); continue; } visitor(new MsBuildProject(prj)); e.UnloadProject(prj); } }
public void TestUnloadProject3 () { Engine a = new Engine (Consts.BinPath); Project p = a.CreateNewProject (); a.UnloadProject (p); a.UnloadProject (p); }
internal void UnloadProject (Engine engine, string file, bool releaseEngine) { lock (unsavedProjects) unsavedProjects.Remove (file); RunSTA (delegate { var loadedProj = engine.GetLoadedProject (file); if (loadedProj != null) engine.UnloadProject (loadedProj); }); }
public void TestUnloadProject2 () { Engine a = new Engine (Consts.BinPath); a.UnloadProject (null); }