UnloadProject() публичный Метод

public UnloadProject ( Microsoft.Build.BuildEngine.Project project ) : void
project Microsoft.Build.BuildEngine.Project
Результат void
Пример #1
0
		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);
			}
		}
Пример #2
0
		public void TestUnloadProject3 ()
		{
			Engine a = new Engine (Consts.BinPath);
			Project p = a.CreateNewProject ();

			a.UnloadProject (p);
			a.UnloadProject (p);
		}
Пример #3
0
		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);
			});
		}
Пример #4
0
		public void TestUnloadProject2 ()
		{
			Engine a = new Engine (Consts.BinPath);

			a.UnloadProject (null);
		}