Browse Source

Fixed http://community.sharpdevelop.net/forums/t/12147.aspx - <configSections> must be first element in app.config

pull/12/head
Daniel Grunwald 15 years ago
parent
commit
130a05be7b
  1. 7
      src/Main/Base/Project/Src/Project/CompilableProject.cs

7
src/Main/Base/Project/Src/Project/CompilableProject.cs

@ -612,7 +612,12 @@ namespace ICSharpCode.SharpDevelop.Project @@ -612,7 +612,12 @@ namespace ICSharpCode.SharpDevelop.Project
XElement startup = configuration.Element("startup");
if (startup == null) {
startup = new XElement("startup");
configuration.AddFirst(startup);
if (configuration.HasElements && configuration.Elements().First().Name == "configSections") {
// <configSections> must be first element
configuration.Elements().First().AddAfterSelf(startup);
} else {
configuration.AddFirst(startup);
}
}
XElement supportedRuntime = startup.Element("supportedRuntime");
if (supportedRuntime == null) {

Loading…
Cancel
Save