Microsoft.Build.BuildEngine.Engine.UnloadAllProjects C# (CSharp) Method

UnloadAllProjects() public method

public UnloadAllProjects ( ) : void
return void
		public void UnloadAllProjects ()
		{
			IList<Project> values = new List<Project> (projects.Values);
			foreach (Project p in values)
				UnloadProject (p);
		}

Usage Example

        public static bool BuildProject(string projectPath)
        {
            bool success = false;
            CultureInfo ci = CultureInfo.InvariantCulture;
            Engine engine = new Engine();
            engine.BinPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.System)
                + @"\..\Microsoft.NET\Framework\v4.0.30319";
            try
            {
                success = engine.BuildProjectFile(projectPath);
            }
            finally
            {
                engine.UnloadAllProjects();
            }

            return success;
        }
All Usage Examples Of Microsoft.Build.BuildEngine.Engine::UnloadAllProjects