5 // Leszek Ciesielski (skolima@gmail.com)
6 // Rolf Bjarne Kvinge (rolf@xamarin.com)
7 // Atsushi Enomoto (atsushi@xamarin.com)
9 // (C) 2011 Leszek Ciesielski
10 // Copyright (C) 2011,2013 Xamarin Inc. (http://www.xamarin.com)
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 using System.Collections.Generic;
34 using System.Diagnostics;
39 using Microsoft.Build.Construction;
40 using Microsoft.Build.Exceptions;
41 using Microsoft.Build.Execution;
42 using Microsoft.Build.Framework;
43 using Microsoft.Build.Internal;
44 using Microsoft.Build.Logging;
45 using System.Collections;
47 // Basically there are two semantic Project object models and their relationship is not obvious
48 // (apart from Microsoft.Build.Construction.ProjectRootElement which is a "construction rule").
50 // Microsoft.Build.Evaluation.Project holds some "editable" project model, and it supports
51 // detailed loader API (such as Items and AllEvaluatedItems).
52 // ProjectPoperty holds UnevaluatedValue and gives EvaluatedValue too.
54 // Microsoft.Build.Execution.ProjectInstance holds "snapshot" of a project, and it lacks
55 // detailed loader API. It does not give us Unevaluated property value.
56 // On the other hand, it supports Targets object model. What Microsoft.Build.Evaluation.Project
57 // offers there is actually a list of Microsoft.Build.Execution.ProjectInstance objects.
58 // It should be also noted that only ProjectInstance has Evaluate() method (Project doesn't).
60 // And both API holds different set of descendant types for each and cannot really share the
61 // loader code. That is lame.
63 // So, can either of them be used to construct the other model? Both API models share the same
64 // "governor", which is Microsoft.Build.Evaluation.ProjectCollection/ Project is added to
65 // its LoadedProjects list, while ProjectInstance isn't. Project cannot be loaded to load
66 // a ProjectInstance, at least within the same ProjectCollection.
68 // On the other hand, can ProjectInstance be used to load a Project? Maybe. Since Project and
69 // its descendants need Microsoft.Build.Construction.ProjectElement family as its API model
70 // is part of the public API. Then I still have to understand how those AllEvaluatedItems/
71 // AllEvaluatedProperties members make sense. EvaluationCounter is another propery in question.
73 namespace Microsoft.Build.Evaluation
75 [DebuggerDisplay ("{FullPath} EffectiveToolsVersion={ToolsVersion} #GlobalProperties="
76 + "{data.globalProperties.Count} #Properties={data.Properties.Count} #ItemTypes="
77 + "{data.ItemTypes.Count} #ItemDefinitions={data.ItemDefinitions.Count} #Items="
78 + "{data.Items.Count} #Targets={data.Targets.Count}")]
81 public Project (XmlReader xml)
82 : this (ProjectRootElement.Create (xml))
86 public Project (XmlReader xml, IDictionary<string, string> globalProperties,
88 : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion)
92 public Project (XmlReader xml, IDictionary<string, string> globalProperties,
93 string toolsVersion, ProjectCollection projectCollection)
94 : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection)
98 public Project (XmlReader xml, IDictionary<string, string> globalProperties,
99 string toolsVersion, ProjectCollection projectCollection,
100 ProjectLoadSettings loadSettings)
101 : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection, loadSettings)
105 public Project (ProjectRootElement xml) : this (xml, null, null)
109 public Project (ProjectRootElement xml, IDictionary<string, string> globalProperties,
111 : this (xml, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection)
115 public Project (ProjectRootElement xml, IDictionary<string, string> globalProperties,
116 string toolsVersion, ProjectCollection projectCollection)
117 : this (xml, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default)
121 public Project (ProjectRootElement xml, IDictionary<string, string> globalProperties,
122 string toolsVersion, ProjectCollection projectCollection,
123 ProjectLoadSettings loadSettings)
125 if (projectCollection == null)
126 throw new ArgumentNullException ("projectCollection");
128 this.GlobalProperties = globalProperties ?? new Dictionary<string, string> ();
129 this.ToolsVersion = toolsVersion;
130 this.ProjectCollection = projectCollection;
131 this.load_settings = loadSettings;
136 Project (ProjectRootElement imported, Project parent)
139 this.GlobalProperties = parent.GlobalProperties;
140 this.ToolsVersion = parent.ToolsVersion;
141 this.ProjectCollection = parent.ProjectCollection;
142 this.load_settings = parent.load_settings;
147 public Project (string projectFile)
148 : this (projectFile, null, null)
152 public Project (string projectFile, IDictionary<string, string> globalProperties,
154 : this (projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection, ProjectLoadSettings.Default)
158 public Project (string projectFile, IDictionary<string, string> globalProperties,
159 string toolsVersion, ProjectCollection projectCollection)
160 : this (projectFile, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default)
164 public Project (string projectFile, IDictionary<string, string> globalProperties,
165 string toolsVersion, ProjectCollection projectCollection,
166 ProjectLoadSettings loadSettings)
167 : this (ProjectRootElement.Create (projectFile), globalProperties, toolsVersion, projectCollection, loadSettings)
171 ProjectLoadSettings load_settings;
173 public IDictionary<string, string> GlobalProperties { get; private set; }
175 public ProjectCollection ProjectCollection { get; private set; }
177 public string ToolsVersion { get; private set; }
179 public ProjectRootElement Xml { get; private set; }
182 Dictionary<string, ProjectItemDefinition> item_definitions;
183 List<ResolvedImport> raw_imports;
184 List<ProjectItem> raw_items;
185 List<ProjectItem> all_evaluated_items;
186 List<ProjectProperty> properties;
187 Dictionary<string, ProjectTargetInstance> targets;
189 void Initialize (Project parent)
191 dir_path = Directory.GetCurrentDirectory ();
192 raw_imports = new List<ResolvedImport> ();
193 item_definitions = new Dictionary<string, ProjectItemDefinition> ();
194 targets = new Dictionary<string, ProjectTargetInstance> ();
195 raw_items = new List<ProjectItem> ();
197 // FIXME: this is likely hack. Test ImportedProject.Properties to see what exactly should happen.
198 if (parent != null) {
199 properties = parent.properties;
201 properties = new List<ProjectProperty> ();
203 foreach (DictionaryEntry p in Environment.GetEnvironmentVariables ())
204 this.properties.Add (new EnvironmentProjectProperty (this, (string)p.Key, (string)p.Value));
205 foreach (var p in GlobalProperties)
206 this.properties.Add (new GlobalProjectProperty (this, p.Key, p.Value));
207 var tools = ProjectCollection.GetToolset (this.ToolsVersion) ?? ProjectCollection.GetToolset (this.ProjectCollection.DefaultToolsVersion);
208 foreach (var p in ProjectCollection.GetReservedProperties (tools, this))
209 this.properties.Add (p);
210 foreach (var p in ProjectCollection.GetWellKnownProperties (this))
211 this.properties.Add (p);
216 ProjectCollection.AddProject (this);
219 static readonly char [] item_sep = {';'};
221 void ProcessXml (Project parent)
223 // this needs to be initialized here (regardless of that items won't be evaluated at property evaluation;
224 // Conditions could incorrectly reference items and lack of this list causes NRE.
225 all_evaluated_items = new List<ProjectItem> ();
227 // property evaluation happens couple of times.
228 // At first step, all non-imported properties are evaluated TOO, WHILE those properties are being evaluated.
229 // This means, Include and IncludeGroup elements with Condition attribute MAY contain references to
230 // properties and they will be expanded.
231 var elements = EvaluatePropertiesAndImports (Xml.Children).ToArray (); // ToArray(): to not lazily evaluate elements.
233 // next, evaluate items
234 EvaluateItems (elements);
236 // finally, evaluate targets and tasks
237 EvaluateTasks (elements);
240 IEnumerable<ProjectElement> EvaluatePropertiesAndImports (IEnumerable<ProjectElement> elements)
242 // First step: evaluate Properties
243 foreach (var child in elements) {
245 var pge = child as ProjectPropertyGroupElement;
246 if (pge != null && Evaluate (pge.Condition))
247 foreach (var p in pge.Properties)
248 // do not allow overwriting reserved or well-known properties by user
249 if (!this.properties.Any (_ => (_.IsReservedProperty || _.IsWellKnownProperty) && _.Name.Equals (p.Name, StringComparison.InvariantCultureIgnoreCase)))
250 if (Evaluate (p.Condition))
251 this.properties.Add (new XmlProjectProperty (this, p, PropertyType.Normal, ProjectCollection.OngoingImports.Any ()));
253 var ige = child as ProjectImportGroupElement;
254 if (ige != null && Evaluate (ige.Condition)) {
255 foreach (var incc in ige.Imports) {
256 foreach (var e in Import (incc))
260 var inc = child as ProjectImportElement;
261 if (inc != null && Evaluate (inc.Condition))
262 foreach (var e in Import (inc))
267 void EvaluateItems (IEnumerable<ProjectElement> elements)
269 foreach (var child in elements) {
270 var ige = child as ProjectItemGroupElement;
272 foreach (var p in ige.Items) {
273 if (!Evaluate (ige.Condition) || !Evaluate (p.Condition))
275 var includes = ExpandString (p.Include).Split (item_sep, StringSplitOptions.RemoveEmptyEntries);
276 var excludes = ExpandString (p.Exclude).Split (item_sep, StringSplitOptions.RemoveEmptyEntries);
278 if (includes.Length == 0)
280 if (includes.Length == 1 && includes [0].IndexOf ('*') < 0 && excludes.Length == 0) {
281 // for most case - shortcut.
282 var item = new ProjectItem (this, p, includes [0]);
283 this.raw_items.Add (item);
284 all_evaluated_items.Add (item);
286 var ds = new Microsoft.Build.BuildEngine.DirectoryScanner () {
287 BaseDirectory = new DirectoryInfo (DirectoryPath),
288 Includes = includes.Select (i => new ProjectTaskItem (p, i)).ToArray (),
289 Excludes = excludes.Select (e => new ProjectTaskItem (p, e)).ToArray (),
292 foreach (var taskItem in ds.MatchedItems) {
293 if (all_evaluated_items.Any (i => i.EvaluatedInclude == taskItem.ItemSpec && i.ItemType == p.ItemType))
294 continue; // skip duplicate
295 var item = new ProjectItem (this, p, taskItem.ItemSpec);
296 string recurse = taskItem.GetMetadata ("RecursiveDir");
297 if (!string.IsNullOrEmpty (recurse))
298 item.RecursiveDir = recurse;
299 this.raw_items.Add (item);
300 all_evaluated_items.Add (item);
305 var def = child as ProjectItemDefinitionGroupElement;
307 foreach (var p in def.ItemDefinitions) {
308 if (Evaluate (p.Condition)) {
309 ProjectItemDefinition existing;
310 if (!item_definitions.TryGetValue (p.ItemType, out existing))
311 item_definitions.Add (p.ItemType, (existing = new ProjectItemDefinition (this, p.ItemType)));
312 existing.AddItems (p);
317 all_evaluated_items.Sort ((p1, p2) => string.Compare (p1.ItemType, p2.ItemType, StringComparison.OrdinalIgnoreCase));
320 void EvaluateTasks (IEnumerable<ProjectElement> elements)
322 foreach (var child in elements) {
323 var te = child as ProjectTargetElement;
325 this.targets.Add (te.Name, new ProjectTargetInstance (te));
329 IEnumerable<ProjectElement> Import (ProjectImportElement import)
331 string dir = ProjectCollection.GetEvaluationTimeThisFileDirectory (() => FullPath);
332 string path = WindowsCompatibilityExtensions.NormalizeFilePath (ExpandString (import.Project));
333 path = Path.IsPathRooted (path) ? path : dir != null ? Path.Combine (dir, path) : Path.GetFullPath (path);
334 if (ProjectCollection.OngoingImports.Contains (path)) {
335 switch (load_settings) {
336 case ProjectLoadSettings.RejectCircularImports:
337 throw new InvalidProjectFileException (import.Location, null, string.Format ("Circular imports was detected: {0} (resolved as \"{1}\") is already on \"importing\" stack", import.Project, path));
339 return new ProjectElement [0]; // do not import circular references
341 ProjectCollection.OngoingImports.Push (path);
343 using (var reader = XmlReader.Create (path)) {
344 var root = ProjectRootElement.Create (reader, ProjectCollection);
345 raw_imports.Add (new ResolvedImport (import, root, true));
346 return this.EvaluatePropertiesAndImports (root.Children).ToArray ();
349 ProjectCollection.OngoingImports.Pop ();
353 public ICollection<ProjectItem> GetItemsIgnoringCondition (string itemType)
355 return new CollectionFromEnumerable<ProjectItem> (raw_items.Where (p => p.ItemType.Equals (itemType, StringComparison.OrdinalIgnoreCase)));
358 public void RemoveItems (IEnumerable<ProjectItem> items)
360 var removal = new List<ProjectItem> (items);
361 foreach (var item in removal) {
362 var parent = item.Xml.Parent;
363 parent.RemoveChild (item.Xml);
364 if (parent.Count == 0)
365 parent.Parent.RemoveChild (parent);
369 static readonly Dictionary<string, string> empty_metadata = new Dictionary<string, string> ();
371 public IList<ProjectItem> AddItem (string itemType, string unevaluatedInclude)
373 return AddItem (itemType, unevaluatedInclude, empty_metadata);
376 public IList<ProjectItem> AddItem (string itemType, string unevaluatedInclude,
377 IEnumerable<KeyValuePair<string, string>> metadata)
379 // FIXME: needs several check that AddItemFast() does not process (see MSDN for details).
381 return AddItemFast (itemType, unevaluatedInclude, metadata);
384 public IList<ProjectItem> AddItemFast (string itemType, string unevaluatedInclude)
386 return AddItemFast (itemType, unevaluatedInclude, empty_metadata);
389 public IList<ProjectItem> AddItemFast (string itemType, string unevaluatedInclude,
390 IEnumerable<KeyValuePair<string, string>> metadata)
392 throw new NotImplementedException ();
395 static readonly char [] target_sep = new char[] {';'};
399 return Build (Xml.DefaultTargets.Split (target_sep, StringSplitOptions.RemoveEmptyEntries));
402 public bool Build (IEnumerable<ILogger> loggers)
404 return Build (Xml.DefaultTargets.Split (target_sep, StringSplitOptions.RemoveEmptyEntries), loggers);
407 public bool Build (string target)
409 return string.IsNullOrWhiteSpace (target) ? Build () : Build (new string [] {target});
412 public bool Build (string[] targets)
414 return Build (targets, new ILogger [0]);
417 public bool Build (ILogger logger)
419 return Build (Xml.DefaultTargets.Split (target_sep, StringSplitOptions.RemoveEmptyEntries), new ILogger [] {logger});
422 public bool Build (string[] targets, IEnumerable<ILogger> loggers)
424 return Build (targets, loggers, new ForwardingLoggerRecord [0]);
427 public bool Build (IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
429 return Build (Xml.DefaultTargets.Split (target_sep, StringSplitOptions.RemoveEmptyEntries), loggers, remoteLoggers);
432 public bool Build (string target, IEnumerable<ILogger> loggers)
434 return Build (new string [] { target }, loggers);
437 public bool Build (string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
439 // Unlike ProjectInstance.Build(), there is no place to fill outputs by targets, so ignore them
440 // (i.e. we don't use the overload with output).
442 // This does not check FullPath, so don't call GetProjectInstanceForBuild() directly.
443 return new BuildManager ().GetProjectInstanceForBuildInternal (this).Build (targets, loggers, remoteLoggers);
446 public bool Build (string target, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
448 return Build (new string [] { target }, loggers, remoteLoggers);
451 public ProjectInstance CreateProjectInstance ()
453 var ret = new ProjectInstance (Xml, GlobalProperties, ToolsVersion, ProjectCollection);
454 // FIXME: maybe fill other properties to the result.
458 bool Evaluate (string unexpandedValue)
460 return string.IsNullOrWhiteSpace (unexpandedValue) || new ExpressionEvaluator (this, null).EvaluateAsBoolean (unexpandedValue);
463 public string ExpandString (string unexpandedValue)
465 return ExpandString (unexpandedValue, null);
468 string ExpandString (string unexpandedValue, string replacementForMissingStuff)
470 return new ExpressionEvaluator (this, replacementForMissingStuff).Evaluate (unexpandedValue);
473 public static string GetEvaluatedItemIncludeEscaped (ProjectItem item)
475 return ProjectCollection.Escape (item.EvaluatedInclude);
478 public static string GetEvaluatedItemIncludeEscaped (ProjectItemDefinition item)
480 // ?? ItemDefinition does not have Include attribute. What's the point here?
481 throw new NotImplementedException ();
484 public ICollection<ProjectItem> GetItems (string itemType)
486 return new CollectionFromEnumerable<ProjectItem> (Items.Where (p => p.ItemType.Equals (itemType, StringComparison.OrdinalIgnoreCase)));
489 public ICollection<ProjectItem> GetItemsByEvaluatedInclude (string evaluatedInclude)
491 return new CollectionFromEnumerable<ProjectItem> (Items.Where (p => p.EvaluatedInclude.Equals (evaluatedInclude, StringComparison.OrdinalIgnoreCase)));
494 public IEnumerable<ProjectElement> GetLogicalProject ()
496 throw new NotImplementedException ();
499 public static string GetMetadataValueEscaped (ProjectMetadata metadatum)
501 return ProjectCollection.Escape (metadatum.EvaluatedValue);
504 public static string GetMetadataValueEscaped (ProjectItem item, string name)
506 var md = item.Metadata.FirstOrDefault (m => m.Name.Equals (name, StringComparison.OrdinalIgnoreCase));
507 return md != null ? ProjectCollection.Escape (md.EvaluatedValue) : null;
510 public static string GetMetadataValueEscaped (ProjectItemDefinition item, string name)
512 var md = item.Metadata.FirstOrDefault (m => m.Name.Equals (name, StringComparison.OrdinalIgnoreCase));
513 return md != null ? ProjectCollection.Escape (md.EvaluatedValue) : null;
516 public string GetPropertyValue (string name)
518 var prop = GetProperty (name);
519 return prop != null ? prop.EvaluatedValue : string.Empty;
522 public static string GetPropertyValueEscaped (ProjectProperty property)
525 //return ProjectCollection.Escape (property.EvaluatedValue);
526 return property.EvaluatedValue;
529 public ProjectProperty GetProperty (string name)
531 return properties.FirstOrDefault (p => p.Name.Equals (name, StringComparison.OrdinalIgnoreCase));
534 public void MarkDirty ()
536 if (!DisableMarkDirty)
540 public void ReevaluateIfNecessary ()
542 throw new NotImplementedException ();
545 public bool RemoveGlobalProperty (string name)
547 throw new NotImplementedException ();
550 public bool RemoveItem (ProjectItem item)
552 throw new NotImplementedException ();
555 public bool RemoveProperty (ProjectProperty property)
557 var removed = properties.FirstOrDefault (p => p.Name.Equals (property.Name, StringComparison.OrdinalIgnoreCase));
560 properties.Remove (removed);
569 public void Save (TextWriter writer)
574 public void Save (string path)
576 Save (path, Encoding.Default);
579 public void Save (Encoding encoding)
581 Save (FullPath, encoding);
584 public void Save (string path, Encoding encoding)
586 using (var writer = new StreamWriter (path, false, encoding))
590 public void SaveLogicalProject (TextWriter writer)
592 throw new NotImplementedException ();
595 public bool SetGlobalProperty (string name, string escapedValue)
597 throw new NotImplementedException ();
600 public ProjectProperty SetProperty (string name, string unevaluatedValue)
602 var p = new ManuallyAddedProjectProperty (this, name, unevaluatedValue);
607 public ICollection<ProjectMetadata> AllEvaluatedItemDefinitionMetadata {
608 get { throw new NotImplementedException (); }
611 public ICollection<ProjectItem> AllEvaluatedItems {
612 get { return all_evaluated_items; }
615 public ICollection<ProjectProperty> AllEvaluatedProperties {
616 get { return properties; }
619 public IDictionary<string, List<string>> ConditionedProperties {
621 // this property returns different instances every time.
622 var dic = new Dictionary<string, List<string>> ();
624 // but I dunno HOW this evaluates
626 throw new NotImplementedException ();
630 public string DirectoryPath {
631 get { return dir_path; }
634 public bool DisableMarkDirty { get; set; }
636 public int EvaluationCounter {
637 get { throw new NotImplementedException (); }
640 public string FullPath {
641 get { return Xml.FullPath; }
642 set { Xml.FullPath = value; }
645 class ResolvedImportComparer : IEqualityComparer<ResolvedImport>
647 public static ResolvedImportComparer Instance = new ResolvedImportComparer ();
649 public bool Equals (ResolvedImport x, ResolvedImport y)
651 return x.ImportedProject.FullPath.Equals (y.ImportedProject.FullPath);
653 public int GetHashCode (ResolvedImport obj)
655 return obj.ImportedProject.FullPath.GetHashCode ();
659 public IList<ResolvedImport> Imports {
660 get { return raw_imports.Distinct (ResolvedImportComparer.Instance).ToList (); }
663 public IList<ResolvedImport> ImportsIncludingDuplicates {
664 get { return raw_imports; }
667 public bool IsBuildEnabled {
668 get { return ProjectCollection.IsBuildEnabled; }
672 public bool IsDirty {
673 get { return is_dirty; }
676 public IDictionary<string, ProjectItemDefinition> ItemDefinitions {
677 get { return item_definitions; }
680 [MonoTODO ("should be different from AllEvaluatedItems")]
681 public ICollection<ProjectItem> Items {
682 get { return AllEvaluatedItems; }
685 public ICollection<ProjectItem> ItemsIgnoringCondition {
686 get { return raw_items; }
689 public ICollection<string> ItemTypes {
690 get { return new CollectionFromEnumerable<string> (raw_items.Select (i => i.ItemType).Distinct ()); }
693 [MonoTODO ("should be different from AllEvaluatedProperties")]
694 public ICollection<ProjectProperty> Properties {
695 get { return AllEvaluatedProperties; }
698 public bool SkipEvaluation { get; set; }
705 IDictionary<string, ProjectTargetInstance> Targets {
706 get { return targets; }
709 // These are required for reserved property, represents dynamically changing property values.
710 // This should resolve to either the project file path or that of the imported file.
711 internal string GetEvaluationTimeThisFileDirectory ()
713 var file = GetEvaluationTimeThisFile ();
714 var dir = Path.IsPathRooted (file) ? Path.GetDirectoryName (file) : Directory.GetCurrentDirectory ();
715 return dir + Path.DirectorySeparatorChar;
718 internal string GetEvaluationTimeThisFile ()
720 return ProjectCollection.OngoingImports.Count > 0 ? ProjectCollection.OngoingImports.Peek () : FullPath ?? string.Empty;
723 internal string GetFullPath (string pathRelativeToProject)
725 if (Path.IsPathRooted (pathRelativeToProject))
726 return pathRelativeToProject;
727 return Path.GetFullPath (Path.Combine (DirectoryPath, pathRelativeToProject));