Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[xbuild] We still need to throw if we fail to import something.

  • Loading branch information...
commit 256094a2a97b27273e6c941d37bda9f51da16cc0 1 parent d915e62
Jeffrey Stedfast jstedfast authored
7 mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
@@ -162,6 +162,8 @@ string GetFullPath ()
162 162 base_dir_info = new DirectoryInfo (Directory.GetCurrentDirectory ());
163 163
164 164 IEnumerable<string> extn_paths = has_extn_ref ? GetExtensionPaths (project) : new string [] {null};
  165 + bool import_needed = false;
  166 +
165 167 try {
166 168 foreach (string path in extn_paths) {
167 169 string extn_msg = null;
@@ -175,6 +177,8 @@ string GetFullPath ()
175 177 if (!ConditionParser.ParseAndEvaluate (condition_attribute, project))
176 178 continue;
177 179
  180 + import_needed = true;
  181 +
178 182 // We stop if atleast one file got imported.
179 183 // Remaining extension paths are *not* tried
180 184 bool atleast_one = false;
@@ -196,6 +200,9 @@ string GetFullPath ()
196 200 if (has_extn_ref)
197 201 project.SetExtensionsPathProperties (Project.DefaultExtensionsPath);
198 202 }
  203 +
  204 + if (import_needed)
  205 + throw new InvalidProjectFileException (String.Format ("{0} could not import \"{1}\"", importingFile, project_attribute));
199 206 }
200 207
201 208 // Parses the Project attribute from an Import,

0 comments on commit 256094a

Please sign in to comment.
Something went wrong with that request. Please try again.