Skip to content

Commit

Permalink
[xbuild] Evaluate Import with MSBuildThisFile* properties set.
Browse files Browse the repository at this point in the history
  • Loading branch information
radical committed Mar 11, 2011
1 parent 6c03bca commit 4d9e096
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1096,12 +1096,18 @@ void AddImport (XmlElement xmlElement, ImportedProject importingProject, bool ev
if (evaluate_properties)
groupingCollection.Evaluate (EvaluationType.Property);

string project_attribute = xmlElement.GetAttribute ("Project");
if (String.IsNullOrEmpty (project_attribute))
throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");
try {
PushThisFileProperty (importingProject != null ? importingProject.FullFileName : FullFileName);

string project_attribute = xmlElement.GetAttribute ("Project");
if (String.IsNullOrEmpty (project_attribute))
throw new InvalidProjectFileException ("The required attribute \"Project\" is missing from element <Import>.");

Import.ForEachExtensionPathTillFound (xmlElement, this, importingProject,
(importPath, from_source_msg) => AddSingleImport (xmlElement, importPath, importingProject, from_source_msg));
Import.ForEachExtensionPathTillFound (xmlElement, this, importingProject,
(importPath, from_source_msg) => AddSingleImport (xmlElement, importPath, importingProject, from_source_msg));
} finally {
PopThisFileProperty ();
}
}

bool AddSingleImport (XmlElement xmlElement, string projectPath, ImportedProject importingProject, string from_source_msg)
Expand Down

0 comments on commit 4d9e096

Please sign in to comment.