+2009-03-13 Ankit Jain <jankit@novell.com>
+
+ * Main.cs (Execute): Build the project/sln with current directory set to
+ the project file's dir.
+ * SolutionParser.cs (ParseSolution): Project paths are relative to
+ solution directory.
+
2009-03-06 Ankit Jain <jankit@novell.com>
Fix bug #481336.
project.Load (projectFile);
+ string oldCurrentDirectory = Environment.CurrentDirectory;
+ Directory.SetCurrentDirectory (Path.GetDirectoryName (projectFile));
result = engine.BuildProject (project, parameters.Targets, null);
+ Directory.SetCurrentDirectory (oldCurrentDirectory);
}
catch (InvalidProjectFileException ipfe) {
StreamReader reader = new StreamReader (file);
string line = reader.ReadToEnd ();
line = line.Replace ("\r\n", "\n");
+ string solutionDir = Path.GetDirectoryName (file);
List<TargetInfo> solutionTargets = new List<TargetInfo> ();
Dictionary<Guid, ProjectInfo> projectInfos = new Dictionary<Guid, ProjectInfo> ();
projectInfos.Add (new Guid (m.Groups[4].Value), projectInfo);
Project currentProject = p.ParentEngine.CreateNewProject ();
- currentProject.Load (projectInfo.FileName.Replace ('\\', Path.DirectorySeparatorChar));
+ currentProject.Load (Path.Combine (solutionDir,
+ projectInfo.FileName.Replace ('\\', Path.DirectorySeparatorChar)));
foreach (BuildItem bi in currentProject.GetEvaluatedItemsByName ("ProjectReference")) {
string projectReferenceGuid = bi.GetEvaluatedMetadata ("Project");