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:
authorMichael Hutchinson <mhutch@xamarin.com>2014-02-06 12:34:06 +0400
committerMichael Hutchinson <mhutch@xamarin.com>2014-02-06 12:34:47 +0400
commit301c8e280fda82e72b0531d1b7dbc5ad2a548673 (patch)
tree4974ad70669cccb6ecf02bed1158da2948262269 /main/src/core/MonoDevelop.Projects.Formats.MSBuild
parent39f59ddac2e19fb2db5ad007be510a1c96cfe4d3 (diff)
[MSBuild] Fix refreshing build when project file changes
Fixes BXC17602 - MD ignores project changes on build
Diffstat (limited to 'main/src/core/MonoDevelop.Projects.Formats.MSBuild')
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs52
1 files changed, 15 insertions, 37 deletions
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
index ce6786a00c..6e2db2895f 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
@@ -49,7 +49,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
static Exception workError;
ManualResetEvent doneEvent = new ManualResetEvent (false);
- Dictionary<string,ProjectCollection> engines = new Dictionary<string, ProjectCollection> ();
Dictionary<string, string> unsavedProjects = new Dictionary<string, string> ();
ProjectCollection engine;
@@ -124,25 +123,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return engine;
}
- ProjectCollection GetEngine (string binDir)
- {
- ProjectCollection engine = null;
- RunSTA (delegate {
- if (!engines.TryGetValue (binDir, out engine)) {
- engine = new ProjectCollection ();
- engine.DefaultToolsVersion = MSBuildConsts.Version;
- engine.SetGlobalProperty ("BuildingInsideVisualStudio", "true");
-
- //we don't have host compilers in MD, and this is set to true by some of the MS targets
- //which causes it to always run the CoreCompile task if BuildingInsideVisualStudio is also
- //true, because the VS in-process compiler would take care of the deps tracking
- engine.SetGlobalProperty ("UseHostCompilerIfAvailable", "false");
- engines [binDir] = engine;
- }
- });
- return engine;
- }
-
internal void UnloadProject (string file)
{
lock (unsavedProjects)
@@ -150,27 +130,25 @@ namespace MonoDevelop.Projects.Formats.MSBuild
RunSTA (delegate
{
- foreach (var engine in engines.Values) {
- //unloading projects modifies the collection, so copy it
- var projects = engine.GetLoadedProjects (file).ToArray ();
+ //unloading projects modifies the collection, so copy it
+ var projects = engine.GetLoadedProjects (file).ToArray ();
- if (projects.Length == 0) {
- return;
- }
+ if (projects.Length == 0) {
+ return;
+ }
- var rootElement = projects[0].Xml;
+ var rootElement = projects[0].Xml;
- foreach (var p in projects) {
- engine.UnloadProject (p);
- }
+ foreach (var p in projects) {
+ engine.UnloadProject (p);
+ }
- //try to unload the projects' XML from the cache
- try {
- engine.UnloadProject (rootElement);
- } catch (InvalidOperationException) {
- // This could fail if something else is referencing the xml somehow.
- // But not a big deal, it's just a cache.
- }
+ //try to unload the projects' XML from the cache
+ try {
+ engine.UnloadProject (rootElement);
+ } catch (InvalidOperationException) {
+ // This could fail if something else is referencing the xml somehow.
+ // But not a big deal, it's just a cache.
}
});
}