Browse Source

Fix #1473: Handle default values for 'Prefer32Bit' correctly.

pull/1515/head v5.0-preview2
Siegfried Pammer 6 years ago
parent
commit
905081ee37
  1. 4
      ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs

4
ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs

@ -219,8 +219,8 @@ namespace ICSharpCode.Decompiler.CSharp
w.WriteStartElement("PropertyGroup"); // platform-specific w.WriteStartElement("PropertyGroup"); // platform-specific
w.WriteAttributeString("Condition", " '$(Platform)' == '" + platformName + "' "); w.WriteAttributeString("Condition", " '$(Platform)' == '" + platformName + "' ");
w.WriteElementString("PlatformTarget", platformName); w.WriteElementString("PlatformTarget", platformName);
if ((module.Reader.PEHeaders.CorHeader.Flags & CorFlags.Prefers32Bit) != 0) { if (frameworkVersionNumber > 400 && platformName == "AnyCPU" && (module.Reader.PEHeaders.CorHeader.Flags & CorFlags.Prefers32Bit) == 0) {
w.WriteElementString("Prefer32Bit", "True"); w.WriteElementString("Prefer32Bit", "false");
} }
w.WriteEndElement(); // </PropertyGroup> (platform-specific) w.WriteEndElement(); // </PropertyGroup> (platform-specific)

Loading…
Cancel
Save