// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
-
using System;
using System.Collections;
using System.Collections.Generic;
Directory.SetCurrentDirectory (Path.GetDirectoryName (fullFileName));
building = true;
result = BuildInternal (targetNames, targetOutputs, buildFlags);
+ } catch (InvalidProjectFileException ie) {
+ ParentEngine.LogErrorWithFilename (fullFileName, ie.Message);
+ ParentEngine.LogMessage (MessageImportance.Low, String.Format ("{0}: {1}", fullFileName, ie.ToString ()));
+ } catch (Exception e) {
+ ParentEngine.LogErrorWithFilename (fullFileName, e.Message);
+ ParentEngine.LogMessage (MessageImportance.Low, String.Format ("{0}: {1}", fullFileName, e.ToString ()));
+ throw;
} finally {
ParentEngine.EndProjectBuild (this, result);
current_settings = BuildSettings.None;
initialTargetsBuilt = true;
}
- foreach (string target in targetNames)
+ foreach (string target in targetNames) {
+ if (target == null)
+ throw new ArgumentNullException ("Target name cannot be null");
+
if (!BuildTarget (target.Trim (), targetOutputs))
return false;
+ }
return true;
}
{
evaluatedItems = new BuildItemGroup (null, this, null, true);
evaluatedItemsIgnoringCondition = new BuildItemGroup (null, this, null, true);
- evaluatedItemsByName = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
- evaluatedItemsByNameIgnoringCondition = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
+ evaluatedItemsByName = new Dictionary <string, BuildItemGroup> (StringComparer.OrdinalIgnoreCase);
+ evaluatedItemsByNameIgnoringCondition = new Dictionary <string, BuildItemGroup> (StringComparer.OrdinalIgnoreCase);
if (building && current_settings == BuildSettings.None)
RemoveBuiltTargets ();
"the first import of this file will be used, ignoring others.",
import.EvaluatedProjectPath, existingImport.ContainedInProjectFileName);
- return false;
+ return true;
}
if (String.Compare (fullFileName, import.EvaluatedProjectPath) == 0) {
"The main project file was imported here, which creates a circular " +
"reference. Ignoring this import.");
- return false;
+ return true;
}
+ if (project_load_settings != ProjectLoadSettings.IgnoreMissingImports &&
+ !import.CheckEvaluatedProjectPathExists ())
+ return false;
+
Imports.Add (import);
string importingFile = importingProject != null ? importingProject.FullFileName : FullFileName;
ParentEngine.LogMessage (MessageImportance.Low,
}
}
-
-#endif