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

CreateNewProject() public method

public CreateNewProject ( ) : Microsoft.Build.BuildEngine.Project
return Microsoft.Build.BuildEngine.Project
		public Project CreateNewProject ()
		{
			return new Project (this);
		}

Usage Example

Example #1
0
		public void TestCondition1 ()
		{
			Engine engine = new Engine (Consts.BinPath);
			Project proj = engine.CreateNewProject ();

			string documentString = @"
				<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
					<PropertyGroup>
						<A Condition='true'></A>
						<B Condition='false'></B>
						<C Condition='TRUE'></C>
						<D Condition='FALSE'></D>
						<E Condition=''>A</E>
					</PropertyGroup>
				</Project>
			";

			proj.LoadXml (documentString);

			Assert.IsNotNull (proj.EvaluatedProperties ["A"], "A1");
			Assert.IsNull (proj.EvaluatedProperties ["B"], "A2");
			Assert.IsNotNull (proj.EvaluatedProperties ["C"], "A3");
			Assert.IsNull (proj.EvaluatedProperties ["D"], "A4");
			Assert.IsNotNull (proj.EvaluatedProperties ["E"], "A5");
		}
All Usage Examples Of Microsoft.Build.BuildEngine.Engine::CreateNewProject