Browse Source

Fixed issue that could cause projects to be initially parsed in the wrong configuration.

newNRvisualizers
Daniel Grunwald 13 years ago
parent
commit
c21b1d1cbf
  1. 16
      src/Main/Base/Project/Src/Project/Solution/Solution.cs

16
src/Main/Base/Project/Src/Project/Solution/Solution.cs

@ -672,12 +672,16 @@ namespace ICSharpCode.SharpDevelop.Project @@ -672,12 +672,16 @@ namespace ICSharpCode.SharpDevelop.Project
return newSec;
}
public SolutionItem GetProjectConfiguration(string guid) {
ProjectSection projectConfigSection = GetProjectConfigurationsSection();
SolutionItem foundItem = projectConfigSection.Items.Find(item => item.Name.StartsWith(guid));
if (foundItem != null)
return foundItem;
LoggingService.Warn("No configuration for project "+guid + "using default.");
SolutionItem GetProjectConfiguration(string guid)
{
ProjectSection prjSec = GetProjectConfigurationsSection();
string searchKey = guid + "." + preferences.ActiveConfiguration + "|" + preferences.ActivePlatform + ".ActiveCfg";
foreach (SolutionItem item in prjSec.Items) {
if (searchKey.Equals(item.Name, StringComparison.OrdinalIgnoreCase)) {
return item;
}
}
LoggingService.Warn("No configuration for project " + guid + "; using default.");
return new SolutionItem("Debug|Any CPU", "Debug|Any CPU");
}

Loading…
Cancel
Save