2 // Project.cs: Project class
5 // Marek Sieradzki (marek.sieradzki@gmail.com)
7 // (C) 2005 Marek Sieradzki
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
37 using System.Xml.Schema;
38 using Microsoft.Build.Framework;
39 using Mono.XBuild.Framework;
41 namespace Microsoft.Build.BuildEngine {
42 public class Project {
45 Dictionary <string, List <string>> conditionedProperties;
46 string[] defaultTargets;
48 BuildItemGroup evaluatedItems;
49 BuildItemGroup evaluatedItemsIgnoringCondition;
50 Dictionary <string, BuildItemGroup> evaluatedItemsByName;
51 Dictionary <string, BuildItemGroup> evaluatedItemsByNameIgnoringCondition;
52 BuildPropertyGroup evaluatedProperties;
53 string firstTargetName;
55 BuildPropertyGroup globalProperties;
56 GroupingCollection groupingCollection;
59 BuildItemGroupCollection itemGroups;
60 ImportCollection imports;
61 string initialTargets;
62 Dictionary <string, BuildItemGroup> last_item_group_containing;
63 bool needToReevaluate;
65 BuildPropertyGroupCollection propertyGroups;
67 TaskDatabase taskDatabase;
68 TargetCollection targets;
69 DateTime timeOfLastDirty;
70 UsingTaskCollection usingTasks;
71 XmlDocument xmlDocument;
74 static XmlNamespaceManager manager;
75 static string ns = "http://schemas.microsoft.com/developer/msbuild/2003";
78 : this (Engine.GlobalEngine)
82 public Project (Engine engine)
84 parentEngine = engine;
86 buildEnabled = ParentEngine.BuildEnabled;
87 xmlDocument = new XmlDocument ();
88 xmlDocument.PreserveWhitespace = false;
89 xmlDocument.AppendChild (xmlDocument.CreateElement ("Project", XmlNamespace));
90 xmlDocument.DocumentElement.SetAttribute ("xmlns", ns);
92 fullFileName = String.Empty;
94 globalProperties = new BuildPropertyGroup (null, this, null, false);
95 foreach (BuildProperty bp in parentEngine.GlobalProperties)
96 GlobalProperties.AddProperty (bp.Clone (true));
101 [MonoTODO ("Not tested")]
102 public void AddNewImport (string importLocation,
103 string importCondition)
105 if (importLocation == null)
106 throw new ArgumentNullException ("importLocation");
108 XmlElement importElement = xmlDocument.CreateElement ("Import", XmlNamespace);
109 xmlDocument.DocumentElement.AppendChild (importElement);
110 importElement.SetAttribute ("Project", importLocation);
111 if (!String.IsNullOrEmpty (importCondition))
112 importElement.SetAttribute ("Condition", importCondition);
114 Import import = new Import (importElement, this, null);
115 imports.Add (import);
116 MarkProjectAsDirty ();
120 public BuildItem AddNewItem (string itemName,
123 return AddNewItem (itemName, itemInclude, false);
126 [MonoTODO ("Adds item not in the same place as MS")]
127 public BuildItem AddNewItem (string itemName,
129 bool treatItemIncludeAsLiteral)
133 if (itemGroups.Count == 0)
134 big = AddNewItemGroup ();
136 if (last_item_group_containing.ContainsKey (itemName)) {
137 big = last_item_group_containing [itemName];
140 BuildItemGroup [] groups = new BuildItemGroup [itemGroups.Count];
141 itemGroups.CopyTo (groups, 0);
146 BuildItem item = big.AddNewItem (itemName, itemInclude, treatItemIncludeAsLiteral);
148 MarkProjectAsDirty ();
154 [MonoTODO ("Not tested")]
155 public BuildItemGroup AddNewItemGroup ()
157 XmlElement element = xmlDocument.CreateElement ("ItemGroup", XmlNamespace);
158 xmlDocument.DocumentElement.AppendChild (element);
160 BuildItemGroup big = new BuildItemGroup (element, this, null, false);
161 itemGroups.Add (big);
162 MarkProjectAsDirty ();
168 [MonoTODO ("Ignores insertAtEndOfProject")]
169 public BuildPropertyGroup AddNewPropertyGroup (bool insertAtEndOfProject)
171 XmlElement element = xmlDocument.CreateElement ("PropertyGroup", XmlNamespace);
172 xmlDocument.DocumentElement.AppendChild (element);
174 BuildPropertyGroup bpg = new BuildPropertyGroup (element, this, null, false);
175 propertyGroups.Add (bpg);
176 MarkProjectAsDirty ();
182 [MonoTODO ("Not tested, isn't added to TaskDatabase (no reevaluation)")]
183 public void AddNewUsingTaskFromAssemblyFile (string taskName,
186 if (taskName == null)
187 throw new ArgumentNullException ("taskName");
188 if (assemblyFile == null)
189 throw new ArgumentNullException ("assemblyFile");
191 XmlElement element = xmlDocument.CreateElement ("UsingTask", XmlNamespace);
192 xmlDocument.DocumentElement.AppendChild (element);
193 element.SetAttribute ("TaskName", taskName);
194 element.SetAttribute ("AssemblyFile", assemblyFile);
196 UsingTask ut = new UsingTask (element, this, null);
198 MarkProjectAsDirty ();
201 [MonoTODO ("Not tested, isn't added to TaskDatabase (no reevaluation)")]
202 public void AddNewUsingTaskFromAssemblyName (string taskName,
205 if (taskName == null)
206 throw new ArgumentNullException ("taskName");
207 if (assemblyName == null)
208 throw new ArgumentNullException ("assemblyName");
210 XmlElement element = xmlDocument.CreateElement ("UsingTask", XmlNamespace);
211 xmlDocument.DocumentElement.AppendChild (element);
212 element.SetAttribute ("TaskName", taskName);
213 element.SetAttribute ("AssemblyName", assemblyName);
215 UsingTask ut = new UsingTask (element, this, null);
217 MarkProjectAsDirty ();
220 [MonoTODO ("Not tested")]
223 return Build (new string [0]);
226 [MonoTODO ("Not tested")]
227 public bool Build (string targetName)
229 return Build (new string [1] { targetName });
232 [MonoTODO ("Not tested")]
233 public bool Build (string[] targetNames)
235 return Build (targetNames, null);
238 [MonoTODO ("Not tested")]
239 public bool Build (string[] targetNames,
240 IDictionary targetOutputs)
242 return Build (targetNames, targetOutputs, BuildSettings.None);
245 [MonoTODO ("Not tested")]
246 public bool Build (string[] targetNames,
247 IDictionary targetOutputs,
248 BuildSettings buildFlags)
252 ParentEngine.StartBuild ();
255 if (targetNames.Length == 0) {
256 if (defaultTargets != null && defaultTargets.Length != 0)
257 targetNames = defaultTargets;
258 else if (firstTargetName != null)
259 targetNames = new string [1] { firstTargetName};
264 foreach (string target in targetNames) {
265 if (!targets.Exists (target))
266 // FIXME: test if it's logged
269 if (!targets [target].Build ())
277 public string[] GetConditionedPropertyValues (string propertyName)
279 if (conditionedProperties.ContainsKey (propertyName))
280 return conditionedProperties [propertyName].ToArray ();
282 return new string [0];
285 public BuildItemGroup GetEvaluatedItemsByName (string itemName)
287 if (needToReevaluate) {
288 needToReevaluate = false;
292 if (evaluatedItemsByName.ContainsKey (itemName))
293 return evaluatedItemsByName [itemName];
295 return new BuildItemGroup ();
298 public BuildItemGroup GetEvaluatedItemsByNameIgnoringCondition (string itemName)
300 if (needToReevaluate) {
301 needToReevaluate = false;
305 if (evaluatedItemsByNameIgnoringCondition.ContainsKey (itemName))
306 return evaluatedItemsByNameIgnoringCondition [itemName];
308 return new BuildItemGroup ();
311 public string GetEvaluatedProperty (string propertyName)
313 if (needToReevaluate) {
314 needToReevaluate = false;
318 if (propertyName == null)
319 throw new ArgumentNullException ("propertyName");
321 BuildProperty bp = evaluatedProperties [propertyName];
323 return bp == null ? null : (string) bp;
326 [MonoTODO ("We should remember that node and not use XPath to get it")]
327 public string GetProjectExtensions (string id)
329 if (id == null || id == String.Empty)
332 XmlNode node = xmlDocument.SelectSingleNode (String.Format ("/tns:Project/tns:ProjectExtensions/tns:{0}", id), XmlNamespaceManager);
337 return node.InnerXml;
341 public void Load (string projectFileName)
343 this.fullFileName = Path.GetFullPath (projectFileName);
344 DoLoad (new StreamReader (projectFileName));
347 [MonoTODO ("Not tested")]
348 public void Load (TextReader textReader)
350 fullFileName = String.Empty;
354 public void LoadXml (string projectXml)
356 fullFileName = String.Empty;
357 DoLoad (new StringReader (projectXml));
358 MarkProjectAsDirty ();
362 public void MarkProjectAsDirty ()
365 timeOfLastDirty = DateTime.Now;
368 [MonoTODO ("Not tested")]
369 public void RemoveAllItemGroups ()
371 int length = ItemGroups.Count;
372 BuildItemGroup [] groups = new BuildItemGroup [length];
373 ItemGroups.CopyTo (groups, 0);
375 for (int i = 0; i < length; i++)
376 RemoveItemGroup (groups [i]);
378 MarkProjectAsDirty ();
382 [MonoTODO ("Not tested")]
383 public void RemoveAllPropertyGroups ()
385 int length = PropertyGroups.Count;
386 BuildPropertyGroup [] groups = new BuildPropertyGroup [length];
387 PropertyGroups.CopyTo (groups, 0);
389 for (int i = 0; i < length; i++)
390 RemovePropertyGroup (groups [i]);
392 MarkProjectAsDirty ();
397 public void RemoveItem (BuildItem itemToRemove)
399 if (itemToRemove == null)
400 throw new ArgumentNullException ("itemToRemove");
402 if (!itemToRemove.FromXml && !itemToRemove.HasParent)
403 throw new InvalidOperationException ("The object passed in is not part of the project.");
405 BuildItemGroup big = itemToRemove.ParentItemGroup;
407 if (big.Count == 1) {
408 // ParentItemGroup for items from xml and that have parent is the same
409 groupingCollection.Remove (big);
411 if (big.ParentProject != this)
412 throw new InvalidOperationException ("The object passed in is not part of the project.");
414 if (itemToRemove.FromXml)
415 big.RemoveItem (itemToRemove);
417 big.RemoveItem (itemToRemove.ParentItem);
420 MarkProjectAsDirty ();
424 [MonoTODO ("Not tested")]
425 public void RemoveItemGroup (BuildItemGroup itemGroupToRemove)
427 if (itemGroupToRemove == null)
428 throw new ArgumentNullException ("itemGroupToRemove");
430 groupingCollection.Remove (itemGroupToRemove);
431 MarkProjectAsDirty ();
435 // NOTE: does not modify imported projects
436 public void RemoveItemGroupsWithMatchingCondition (string matchingCondition)
438 throw new NotImplementedException ();
442 public void RemoveItemsByName (string itemName)
444 if (itemName == null)
445 throw new ArgumentNullException ("itemName");
447 throw new NotImplementedException ();
450 [MonoTODO ("Not tested")]
451 public void RemovePropertyGroup (BuildPropertyGroup propertyGroupToRemove)
453 if (propertyGroupToRemove == null)
454 throw new ArgumentNullException ("propertyGroupToRemove");
456 groupingCollection.Remove (propertyGroupToRemove);
457 MarkProjectAsDirty ();
461 // NOTE: does not modify imported projects
462 public void RemovePropertyGroupsWithMatchingCondition (string matchCondition)
464 throw new NotImplementedException ();
468 public void ResetBuildStatus ()
470 throw new NotImplementedException ();
473 public void Save (string projectFileName)
475 Save (projectFileName, Encoding.Default);
479 [MonoTODO ("Ignores encoding")]
480 public void Save (string projectFileName, Encoding encoding)
482 xmlDocument.Save (projectFileName);
486 public void Save (TextWriter outTextWriter)
488 xmlDocument.Save (outTextWriter);
492 public void SetImportedProperty (string propertyName,
493 string propertyValue,
495 Project importProject)
497 SetImportedProperty (propertyName, propertyValue, condition, importProject,
498 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup);
501 public void SetImportedProperty (string propertyName,
502 string propertyValue,
504 Project importedProject,
505 PropertyPosition position)
507 SetImportedProperty (propertyName, propertyValue, condition, importedProject,
508 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup, false);
512 public void SetImportedProperty (string propertyName,
513 string propertyValue,
515 Project importedProject,
516 PropertyPosition position,
517 bool treatPropertyValueAsLiteral)
519 throw new NotImplementedException ();
522 public void SetProjectExtensions (string id, string xmlText)
525 throw new ArgumentNullException ("id");
527 throw new ArgumentNullException ("xmlText");
529 XmlNode projectExtensions, node;
531 projectExtensions = xmlDocument.SelectSingleNode ("/tns:Project/tns:ProjectExtensions", XmlNamespaceManager);
533 if (projectExtensions == null) {
534 projectExtensions = xmlDocument.CreateElement ("ProjectExtensions", XmlNamespace);
535 xmlDocument.DocumentElement.AppendChild (projectExtensions);
537 node = xmlDocument.CreateElement (id, XmlNamespace);
538 node.InnerXml = xmlText;
539 projectExtensions.AppendChild (node);
541 node = xmlDocument.SelectSingleNode (String.Format ("/tns:Project/tns:ProjectExtensions/tns:{0}", id), XmlNamespaceManager);
544 node = xmlDocument.CreateElement (id, XmlNamespace);
545 projectExtensions.AppendChild (node);
548 node.InnerXml = xmlText;
552 MarkProjectAsDirty ();
555 public void SetProperty (string propertyName,
556 string propertyValue)
558 SetProperty (propertyName, propertyValue, "true",
559 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup, false);
562 public void SetProperty (string propertyName,
563 string propertyValue,
566 SetProperty (propertyName, propertyValue, condition,
567 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup);
570 public void SetProperty (string propertyName,
571 string propertyValue,
573 PropertyPosition position)
575 SetProperty (propertyName, propertyValue, condition,
576 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup, false);
580 public void SetProperty (string propertyName,
581 string propertyValue,
583 PropertyPosition position,
584 bool treatPropertyValueAsLiteral)
586 throw new NotImplementedException ();
589 internal void Unload ()
594 internal void CheckUnloaded ()
597 throw new InvalidOperationException ("This project object has been unloaded from the MSBuild engine and is no longer valid.");
600 internal void NeedToReevaluate ()
602 needToReevaluate = true;
605 // Does the actual loading.
606 void DoLoad (TextReader textReader)
609 ParentEngine.RemoveLoadedProject (this);
611 XmlReaderSettings settings = new XmlReaderSettings ();
613 if (SchemaFile != null) {
614 settings.Schemas.Add (null, SchemaFile);
615 settings.ValidationType = ValidationType.Schema;
616 settings.ValidationEventHandler += new ValidationEventHandler (ValidationCallBack);
619 XmlReader xmlReader = XmlReader.Create (textReader, settings);
620 xmlDocument.Load (xmlReader);
622 if (xmlDocument.DocumentElement.Name != "Project") {
623 throw new InvalidProjectFileException (String.Format (
624 "The element <{0}> is unrecognized, or not supported in this context.", xmlDocument.DocumentElement.Name));
627 if (xmlDocument.DocumentElement.GetAttribute ("xmlns") != ns) {
628 throw new InvalidProjectFileException (
629 @"The default XML namespace of the project must be the MSBuild XML namespace." +
630 " If the project is authored in the MSBuild 2003 format, please add " +
631 "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" to the <Project> element. " +
632 "If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. ");
635 ParentEngine.AddLoadedProject (this);
636 } catch (Exception e) {
637 throw new InvalidProjectFileException (e.Message, e);
650 groupingCollection = new GroupingCollection (this);
651 imports = new ImportCollection (groupingCollection);
652 usingTasks = new UsingTaskCollection (this);
653 itemGroups = new BuildItemGroupCollection (groupingCollection);
654 propertyGroups = new BuildPropertyGroupCollection (groupingCollection);
655 targets = new TargetCollection (this);
656 last_item_group_containing = new Dictionary <string, BuildItemGroup> ();
658 taskDatabase = new TaskDatabase ();
659 if (ParentEngine.DefaultTasksRegistered)
660 taskDatabase.CopyTasks (ParentEngine.DefaultTasks);
662 if (xmlDocument.DocumentElement.GetAttributeNode ("DefaultTargets") != null)
663 defaultTargets = xmlDocument.DocumentElement.GetAttribute ("DefaultTargets").Split (';');
665 defaultTargets = new string [0];
667 ProcessElements (xmlDocument.DocumentElement, null);
673 internal void ProcessElements (XmlElement rootElement, ImportedProject ip)
675 foreach (XmlNode xn in rootElement.ChildNodes) {
676 if (xn is XmlElement) {
677 XmlElement xe = (XmlElement) xn;
679 case "ProjectExtensions":
680 AddProjectExtensions (xe);
691 AddUsingTask (xe, ip);
697 AddItemGroup (xe, ip);
699 case "PropertyGroup":
700 AddPropertyGroup (xe, ip);
706 throw new InvalidProjectFileException ("Invalid element in project file.");
714 evaluatedItems = new BuildItemGroup (null, this, null, true);
715 evaluatedItemsIgnoringCondition = new BuildItemGroup (null, this, null, true);
716 evaluatedItemsByName = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
717 evaluatedItemsByNameIgnoringCondition = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
718 evaluatedProperties = new BuildPropertyGroup (null, null, null, true);
720 InitializeProperties ();
722 groupingCollection.Evaluate ();
724 //FIXME: UsingTasks aren't really evaluated. (shouldn't use expressions or anything)
725 foreach (UsingTask usingTask in UsingTasks)
726 usingTask.Evaluate ();
729 void InitializeProperties ()
733 foreach (BuildProperty gp in GlobalProperties) {
734 bp = new BuildProperty (gp.Name, gp.Value, PropertyType.Global);
735 EvaluatedProperties.AddProperty (bp);
738 foreach (DictionaryEntry de in Environment.GetEnvironmentVariables ()) {
739 bp = new BuildProperty ((string) de.Key, (string) de.Value, PropertyType.Environment);
740 EvaluatedProperties.AddProperty (bp);
743 EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildBinPath", parentEngine.BinPath, PropertyType.Reserved));
745 // FIXME: make some internal method that will work like GetDirectoryName but output String.Empty on null/String.Empty
747 if (FullFileName == String.Empty)
748 projectDir = Environment.CurrentDirectory;
750 projectDir = Path.GetDirectoryName (FullFileName);
752 EvaluatedProperties.AddProperty (new BuildProperty ("MSBuildProjectDirectory", projectDir, PropertyType.Reserved));
755 void AddProjectExtensions (XmlElement xmlElement)
759 void AddMessage (XmlElement xmlElement)
763 void AddTarget (XmlElement xmlElement, ImportedProject importedProject)
765 Target target = new Target (xmlElement, this, importedProject);
766 targets.AddTarget (target);
768 if (firstTargetName == null)
769 firstTargetName = target.Name;
772 void AddUsingTask (XmlElement xmlElement, ImportedProject importedProject)
776 usingTask = new UsingTask (xmlElement, this, importedProject);
777 UsingTasks.Add (usingTask);
780 void AddImport (XmlElement xmlElement, ImportedProject importingProject)
784 import = new Import (xmlElement, this, importingProject);
785 Imports.Add (import);
788 void AddItemGroup (XmlElement xmlElement, ImportedProject importedProject)
790 BuildItemGroup big = new BuildItemGroup (xmlElement, this, importedProject, false);
791 ItemGroups.Add (big);
794 void AddPropertyGroup (XmlElement xmlElement, ImportedProject importedProject)
796 BuildPropertyGroup bpg = new BuildPropertyGroup (xmlElement, this, importedProject, false);
797 PropertyGroups.Add (bpg);
800 void AddChoose (XmlElement xmlElement)
802 BuildChoose bc = new BuildChoose (xmlElement, this);
803 groupingCollection.Add (bc);
806 static void ValidationCallBack (object sender, ValidationEventArgs e)
808 Console.WriteLine ("Validation Error: {0}", e.Message);
811 public bool BuildEnabled {
816 buildEnabled = value;
821 public Encoding Encoding {
822 get { return encoding; }
825 public string DefaultTargets {
827 return xmlDocument.DocumentElement.GetAttribute ("DefaultTargets");
830 xmlDocument.DocumentElement.SetAttribute ("DefaultTargets", value);
831 defaultTargets = value.Split (';');
835 public BuildItemGroup EvaluatedItems {
837 if (needToReevaluate) {
838 needToReevaluate = false;
841 return evaluatedItems;
845 public BuildItemGroup EvaluatedItemsIgnoringCondition {
847 if (needToReevaluate) {
848 needToReevaluate = false;
851 return evaluatedItemsIgnoringCondition;
855 internal IDictionary <string, BuildItemGroup> EvaluatedItemsByName {
857 // FIXME: do we need to do this here?
858 if (needToReevaluate) {
859 needToReevaluate = false;
862 return evaluatedItemsByName;
866 internal IDictionary <string, BuildItemGroup> EvaluatedItemsByNameIgnoringCondition {
868 // FIXME: do we need to do this here?
869 if (needToReevaluate) {
870 needToReevaluate = false;
873 return evaluatedItemsByNameIgnoringCondition;
877 public BuildPropertyGroup EvaluatedProperties {
879 if (needToReevaluate) {
880 needToReevaluate = false;
883 return evaluatedProperties;
887 public string FullFileName {
888 get { return fullFileName; }
889 set { fullFileName = value; }
892 public BuildPropertyGroup GlobalProperties {
893 get { return globalProperties; }
896 throw new ArgumentNullException ("value");
899 throw new InvalidOperationException ("GlobalProperties can not be set to persisted property group.");
901 globalProperties = value;
906 public bool IsDirty {
907 get { return isDirty; }
910 public bool IsValidated {
911 get { return isValidated; }
912 set { isValidated = value; }
915 public BuildItemGroupCollection ItemGroups {
916 get { return itemGroups; }
919 public ImportCollection Imports {
920 get { return imports; }
923 public string InitialTargets {
924 get { return initialTargets; }
925 set { initialTargets = value; }
928 public Engine ParentEngine {
929 get { return parentEngine; }
932 public BuildPropertyGroupCollection PropertyGroups {
933 get { return propertyGroups; }
936 public string SchemaFile {
937 get { return schemaFile; }
938 set { schemaFile = value; }
941 public TargetCollection Targets {
942 get { return targets; }
945 public DateTime TimeOfLastDirty {
946 get { return timeOfLastDirty; }
949 public UsingTaskCollection UsingTasks {
950 get { return usingTasks; }
955 get { return xmlDocument.InnerXml; }
958 internal Dictionary <string, BuildItemGroup> LastItemGroupContaining {
959 get { return last_item_group_containing; }
962 internal static XmlNamespaceManager XmlNamespaceManager {
964 if (manager == null) {
965 manager = new XmlNamespaceManager (new NameTable ());
966 manager.AddNamespace ("tns", ns);
973 internal TaskDatabase TaskDatabase {
974 get { return taskDatabase; }
977 internal XmlDocument XmlDocument {
978 get { return xmlDocument; }
981 internal static string XmlNamespace {