diff --git a/src/Libraries/NRefactory/NRefactoryASTGenerator/NRefactoryASTGenerator.csproj b/src/Libraries/NRefactory/NRefactoryASTGenerator/NRefactoryASTGenerator.csproj
index d95bf39e97..462f607bb8 100644
--- a/src/Libraries/NRefactory/NRefactoryASTGenerator/NRefactoryASTGenerator.csproj
+++ b/src/Libraries/NRefactory/NRefactoryASTGenerator/NRefactoryASTGenerator.csproj
@@ -59,4 +59,4 @@
-
+
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Project/CompilableProject.cs b/src/Main/Base/Project/Src/Project/CompilableProject.cs
index 74484ba962..a81b834a2f 100644
--- a/src/Main/Base/Project/Src/Project/CompilableProject.cs
+++ b/src/Main/Base/Project/Src/Project/CompilableProject.cs
@@ -88,6 +88,7 @@ namespace ICSharpCode.SharpDevelop.Project
PropertyStorageLocations.ConfigurationSpecific, true);
SetProperty("Release", null, "OutputPath", @"bin\Release\",
PropertyStorageLocations.ConfigurationSpecific, true);
+ InvalidateConfigurationPlatformNames();
SetProperty("Debug", null, "DebugSymbols", "True",
PropertyStorageLocations.ConfigurationSpecific, true);
diff --git a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
index 4f6c7e8dc5..464503e168 100644
--- a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
+++ b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
@@ -167,10 +167,11 @@ namespace ICSharpCode.SharpDevelop.Project
MSBuild.BuildPropertyGroup group = project.AddNewPropertyGroup(false);
group.AddNewProperty(ProjectGuidPropertyName, IdGuid, true);
group.AddNewProperty("Configuration", "Debug", true).Condition = " '$(Configuration)' == '' ";
- group.AddNewProperty("Platform", "AnyCPU", true).Condition = " '$(Platform)' == '' ";
+ group.AddNewProperty("Platform", "x86", true).Condition = " '$(Platform)' == '' ";
this.ActiveConfiguration = "Debug";
- this.ActivePlatform = "AnyCPU";
+ this.ActivePlatform = "x86";
+ SetProperty(null, "x86", "PlatformTarget", "x86", PropertyStorageLocations.PlatformSpecific, false);
}
///
@@ -1135,6 +1136,14 @@ namespace ICSharpCode.SharpDevelop.Project
}
}
+ protected void InvalidateConfigurationPlatformNames()
+ {
+ lock (SyncRoot) {
+ configurationNames = null;
+ platformNames = null;
+ }
+ }
+
///
/// Load available configurations and platforms from the project file
/// by looking at which conditions are used.
diff --git a/src/Main/Base/Project/Src/Project/Solution/Solution.cs b/src/Main/Base/Project/Src/Project/Solution/Solution.cs
index 488cc4154d..9a9e30f8d9 100644
--- a/src/Main/Base/Project/Src/Project/Solution/Solution.cs
+++ b/src/Main/Base/Project/Src/Project/Solution/Solution.cs
@@ -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
}
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
// 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;
}