Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <jeff@xamarin.com>2012-04-26 21:51:10 +0400
committerJeffrey Stedfast <jeff@xamarin.com>2012-04-26 21:59:52 +0400
commit256094a2a97b27273e6c941d37bda9f51da16cc0 (patch)
tree851ce6bf28169d6288efad44fa32bb2634c956d1
parentd915e62ba5ab1c082ccc0d50d2d7b8cb0f31e858 (diff)
[xbuild] We still need to throw if we fail to import something.mono-2-10-9
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
index f0c2c3115f1..79893411b88 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
@@ -162,6 +162,8 @@ namespace Microsoft.Build.BuildEngine {
base_dir_info = new DirectoryInfo (Directory.GetCurrentDirectory ());
IEnumerable<string> extn_paths = has_extn_ref ? GetExtensionPaths (project) : new string [] {null};
+ bool import_needed = false;
+
try {
foreach (string path in extn_paths) {
string extn_msg = null;
@@ -175,6 +177,8 @@ namespace Microsoft.Build.BuildEngine {
if (!ConditionParser.ParseAndEvaluate (condition_attribute, project))
continue;
+ import_needed = true;
+
// We stop if atleast one file got imported.
// Remaining extension paths are *not* tried
bool atleast_one = false;
@@ -196,6 +200,9 @@ namespace Microsoft.Build.BuildEngine {
if (has_extn_ref)
project.SetExtensionsPathProperties (Project.DefaultExtensionsPath);
}
+
+ if (import_needed)
+ throw new InvalidProjectFileException (String.Format ("{0} could not import \"{1}\"", importingFile, project_attribute));
}
// Parses the Project attribute from an Import,