|
|
|
@ -252,8 +252,35 @@ namespace ICSharpCode.SharpDevelop.Project
@@ -252,8 +252,35 @@ namespace ICSharpCode.SharpDevelop.Project
|
|
|
|
|
|
|
|
|
|
public override void AddFolder(ISolutionFolder folder) |
|
|
|
|
{ |
|
|
|
|
IProject project = folder as IProject; |
|
|
|
|
if (project != null) { |
|
|
|
|
if (this.GetConfigurationNames().Count == 0) { |
|
|
|
|
foreach (string config in project.ConfigurationNames) { |
|
|
|
|
foreach (string platform in project.PlatformNames) |
|
|
|
|
AddSolutionConfigurationPlatform(config, FixPlatformNameForSolution(platform), null, false, false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
base.AddFolder(folder); |
|
|
|
|
guidDictionary[folder.IdGuid] = folder; |
|
|
|
|
if (project != null) { |
|
|
|
|
var projectConfigurations = project.ConfigurationNames; |
|
|
|
|
var solutionConfigurations = this.GetConfigurationNames(); |
|
|
|
|
var projectPlatforms = project.PlatformNames; |
|
|
|
|
var solutionPlatforms = this.GetPlatformNames(); |
|
|
|
|
foreach (string config in solutionConfigurations) { |
|
|
|
|
string projectConfig = config; |
|
|
|
|
if (!projectConfigurations.Contains(projectConfig)) |
|
|
|
|
projectConfig = projectConfigurations.FirstOrDefault() ?? "Debug"; |
|
|
|
|
foreach (string platform in solutionPlatforms) { |
|
|
|
|
string projectPlatform = FixPlatformNameForProject(platform); |
|
|
|
|
if (!projectPlatforms.Contains(projectPlatform)) |
|
|
|
|
projectPlatform = projectPlatforms.FirstOrDefault() ?? "AnyCPU"; |
|
|
|
|
|
|
|
|
|
CreateMatchingItem(config, platform, project, projectConfig + "|" + FixPlatformNameForSolution(projectPlatform)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
@ -577,6 +604,8 @@ namespace ICSharpCode.SharpDevelop.Project
@@ -577,6 +604,8 @@ namespace ICSharpCode.SharpDevelop.Project
|
|
|
|
|
} |
|
|
|
|
ProjectSection newSec = new ProjectSection("SolutionConfigurationPlatforms", "preSolution"); |
|
|
|
|
this.Sections.Insert(0, newSec); |
|
|
|
|
|
|
|
|
|
// convert VS 2003 solution to VS 2005 (or later)
|
|
|
|
|
foreach (ProjectSection sec in this.Sections) { |
|
|
|
|
if (sec.Name == "SolutionConfiguration") { |
|
|
|
|
this.Sections.Remove(sec); |
|
|
|
@ -584,7 +613,7 @@ namespace ICSharpCode.SharpDevelop.Project
@@ -584,7 +613,7 @@ namespace ICSharpCode.SharpDevelop.Project
|
|
|
|
|
// item.Name = item.Location
|
|
|
|
|
// might be ConfigName.0 = Debug (VS.NET)
|
|
|
|
|
// or Debug = Debug (VS.NET 03)
|
|
|
|
|
newSec.Items.Add(new SolutionItem(item.Location + "|Any CPU", item.Location + "|Any CPU")); |
|
|
|
|
newSec.Items.Add(new SolutionItem(item.Location + "|x86", item.Location + "|x86")); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|