Browse Source

Fixed SD2-786: Opening a .csproj file with no .sln generates a .sln with AnyCPU instead of Any CPU

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1382 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
ea04a26043
  1. 9
      src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs

9
src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs

@ -235,6 +235,8 @@ namespace ICSharpCode.SharpDevelop.Project @@ -235,6 +235,8 @@ namespace ICSharpCode.SharpDevelop.Project
string file = GetPreferenceFileName(openSolution.FileName);
if (FileUtility.IsValidFileName(file) && File.Exists(file)) {
(openSolution.Preferences as IMementoCapable).SetMemento(Properties.Load(file));
} else {
(openSolution.Preferences as IMementoCapable).SetMemento(new Properties());
}
ApplyConfigurationAndReadPreferences();
} catch (Exception ex) {
@ -299,7 +301,12 @@ namespace ICSharpCode.SharpDevelop.Project @@ -299,7 +301,12 @@ namespace ICSharpCode.SharpDevelop.Project
ProjectSection configSection = solution.GetSolutionConfigurationsSection();
foreach (string configuration in project.GetConfigurationNames()) {
foreach (string platform in project.GetPlatformNames()) {
string key = configuration + "|" + platform;
string key;
if (platform == "AnyCPU") { // Fix for SD2-786
key = configuration + "|Any CPU";
} else {
key = configuration + "|" + platform;
}
configSection.Items.Add(new SolutionItem(key, key));
}
}

Loading…
Cancel
Save