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

BuildProject() private method

private BuildProject ( Microsoft.Build.BuildEngine.Project project ) : bool
project Microsoft.Build.BuildEngine.Project
return bool
		public bool BuildProject (Project project)
		{
			if (project == null)
				throw new ArgumentException ("project");
			builtTargetsOutputByName.Clear ();
			return project.Build ();
		}
		

Same methods

Engine::BuildProject ( Microsoft.Build.BuildEngine.Project project, string targetName ) : bool
Engine::BuildProject ( Microsoft.Build.BuildEngine.Project project, string targetNames, IDictionary targetOutputs ) : bool
Engine::BuildProject ( Microsoft.Build.BuildEngine.Project project, string targetNames, IDictionary targetOutputs, BuildSettings buildFlags ) : bool

Usage Example

Example #1
0
        protected override bool CompileSingle(Engine engine, AbstractBaseGenerator gen, string workingPath, string target)
        {
            try
            {
                using (log4net.NDC.Push("Compiling " + gen.Description))
                {
                    Log.DebugFormat("Loading MsBuild Project");
                    var proj = new Project(engine);
                    proj.Load(Helper.PathCombine(workingPath, gen.TargetNameSpace, gen.ProjectFileName));

                    Log.DebugFormat("Compiling");
                    if (engine.BuildProject(proj, target))
                    {
                        return true;
                    }
                    else
                    {
                        Log.ErrorFormat("Failed to compile {0}", gen.Description);
                        return false;
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Error("Failed compiling " + gen.Description, ex);
                return false;
            }
        }
All Usage Examples Of Microsoft.Build.BuildEngine.Engine::BuildProject