diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2013-08-28 18:34:31 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2013-08-28 18:34:31 +0400 |
commit | e05302a3b5e3d064ca36d7573c97071a9863bf19 (patch) | |
tree | 6fb0b867f0baed039bad21c112151896e58a220b /main/src/core/MonoDevelop.Projects.Formats.MSBuild | |
parent | 613f439160c76be2fa5ffc2206b5470510d2f1eb (diff) |
Revert "Revert "[MSBuild] Fix regression when building msbuild projects""
This reverts commit bc12ac115d37fbf151a7b087f7024608f4a238e2.
Diffstat (limited to 'main/src/core/MonoDevelop.Projects.Formats.MSBuild')
2 files changed, 10 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs index 56960f921d..8969330d3a 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs @@ -151,11 +151,13 @@ namespace MonoDevelop.Projects.Formats.MSBuild var p = engine.GetLoadedProject (pc.ProjectFile); if (p == null) { p = new Project (engine); - var content = buildEngine.GetUnsavedProjectContent (pc.ProjectFile); - if (content == null) - p.Load (pc.ProjectFile); - else - p.Load (new StringReader (content)); + var content = buildEngine.GetUnsavedProjectContent (pc.ProjectFile);
+ if (content == null)
+ p.Load (pc.ProjectFile);
+ else {
+ p.FullFileName = pc.ProjectFile;
+ p.Load (new StringReader (content));
+ } } p.GlobalProperties.SetProperty ("Configuration", pc.Configuration); if (!string.IsNullOrEmpty (pc.Platform)) diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs index b460fa3bd9..7974ea852d 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs @@ -166,8 +166,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild var content = buildEngine.GetUnsavedProjectContent (file);
if (content == null)
p = engine.LoadProject (file);
- else
+ else {
p = engine.LoadProject (new XmlTextReader (new StringReader (content)));
+ p.FullPath = file;
+ }
}
p.SetProperty ("Configuration", configuration);
if (!string.IsNullOrEmpty (platform))
|