diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs index 2d771c4768..ce61d7b9f5 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs @@ -118,8 +118,8 @@ namespace ICSharpCode.SharpDevelop.Project } } } - treeView.SelectedNode = null; - ProjectService.CurrentProject = null; +// treeView.SelectedNode = null; +// ProjectService.CurrentProject = null; } public void ViewSolution(Solution solution) diff --git a/src/Main/Base/Project/Src/Project/MSBuildProject.cs b/src/Main/Base/Project/Src/Project/MSBuildProject.cs index 16f19b2b24..91d93ce8df 100644 --- a/src/Main/Base/Project/Src/Project/MSBuildProject.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildProject.cs @@ -266,6 +266,7 @@ namespace ICSharpCode.SharpDevelop.Project // readonly static Regex normalError = new Regex(@"^(?\S.*)\((?\d+),(?\d+)\):\s+(?\w+)\s+(?[\d\w]+):\s+(?.*)$", RegexOptions.Compiled); readonly static Regex generalError = new Regex(@"^(?\S.+)\s+(?[\d\w]+):\s+(?.*)$", RegexOptions.Compiled); + readonly static Regex projectName = new Regex(@"^Project\s+\""(?[^""]*)\""", RegexOptions.Compiled); static CompilerError GetCompilerError(string line, string workingPath) { @@ -316,9 +317,19 @@ namespace ICSharpCode.SharpDevelop.Project string line = reader.ReadLine(); if (line != null) { TaskService.BuildMessageViewCategory.AppendText(line + Environment.NewLine); - CompilerError error = GetCompilerError(line, workingDirectory); - if (error != null) { - results.Errors.Add(error); + + Match match = projectName.Match(line); + if (match.Success) { + string name = match.Result("${name}"); + + if (name != null) { + workingDirectory = Path.GetDirectoryName(name); + } + } else { + CompilerError error = GetCompilerError(line, workingDirectory); + if (error != null) { + results.Errors.Add(error); + } } results.Output.Add(line); }