Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <ward.matt@gmail.com>2014-06-17 16:50:11 +0400
committerMatt Ward <ward.matt@gmail.com>2014-06-17 16:50:11 +0400
commit5ac097efad7b10142cff27c5e30d56d76c91724f (patch)
tree39c35854d8d2d7186a63e3e4d53449216ef89b62 /main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
parent34be5c15de5098d6ea9ceccb7364fae97f39f2e8 (diff)
parentea577f4a208954bb52f99abfea0db1f73f321420 (diff)
Merge branch 'master' into msbuild-import-conditions
Conflicts: main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs')
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs29
1 files changed, 19 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
index 2f5117e387..96e68d4cef 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
@@ -259,8 +259,17 @@ namespace MonoDevelop.Projects.Formats.MSBuild
SolutionEntityItem item = (SolutionEntityItem) Item;
RemoteProjectBuilder builder = GetProjectBuilder ();
var configs = GetConfigurations (item, configuration);
- foreach (string s in builder.GetAssemblyReferences (configs))
- yield return s;
+
+ var result = builder.Run (
+ configs, null, MSBuildVerbosity.Normal,
+ new[] { "ResolveAssemblyReferences" }, new [] { "ReferencePath" }, null
+ );
+
+ List<MSBuildEvaluatedItem> items;
+ if (result.Items.TryGetValue ("ReferencePath", out items) && items != null) {
+ foreach (var i in items)
+ yield return i.ItemSpec;
+ }
}
else {
CleanupProjectBuilder ();
@@ -282,19 +291,19 @@ namespace MonoDevelop.Projects.Formats.MSBuild
LogWriter logWriter = new LogWriter (monitor.Log);
RemoteProjectBuilder builder = GetProjectBuilder ();
var configs = GetConfigurations (item, configuration);
- MSBuildResult[] results = builder.RunTarget (target, configs, logWriter, MSBuildProjectService.DefaultMSBuildVerbosity);
+ var result = builder.Run (configs, logWriter, MSBuildProjectService.DefaultMSBuildVerbosity, new[] { target }, null, null);
System.Runtime.Remoting.RemotingServices.Disconnect (logWriter);
var br = new BuildResult ();
- foreach (MSBuildResult res in results) {
+ foreach (var err in result.Errors) {
FilePath file = null;
- if (res.File != null)
- file = Path.Combine (Path.GetDirectoryName (res.ProjectFile), res.File);
+ if (err.File != null)
+ file = Path.Combine (Path.GetDirectoryName (err.ProjectFile), err.File);
- if (res.IsWarning)
- br.AddWarning (file, res.LineNumber, res.ColumnNumber, res.Code, res.Message);
+ if (err.IsWarning)
+ br.AddWarning (file, err.LineNumber, err.ColumnNumber, err.Code, err.Message);
else
- br.AddError (file, res.LineNumber, res.ColumnNumber, res.Code, res.Message);
+ br.AddError (file, err.LineNumber, err.ColumnNumber, err.Code, err.Message);
}
return br;
}
@@ -360,7 +369,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
// Workaround for a VS issue. VS doesn't include the curly braces in the ProjectGuid
// of shared projects.
- if (!itemGuid.StartsWith ("{") && fileName.EndsWith (".shproj"))
+ if (!itemGuid.StartsWith ("{"))
itemGuid = "{" + itemGuid + "}";
itemGuid = itemGuid.ToUpper ();