Browse Source

No guid and versions displayed if there is no attributes in assemblyinfo file.

pull/624/head
olegbevz 11 years ago
parent
commit
6c2fc19637
  1. 2
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfo.cs
  2. 9
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfoProvider.cs

2
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfo.cs

@ -42,7 +42,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -42,7 +42,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
public Version InformationalVersion { get; set; }
public Guid Guid { get; set; }
public Guid? Guid { get; set; }
public string NeutralLanguage { get; set; }

9
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/AssemblyInfo/AssemblyInfoProvider.cs

@ -37,7 +37,6 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -37,7 +37,6 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
throw new Exception("Can't read assembly info syntax tree.");
var assemblyInfo = new AssemblyInfo();
assemblyInfo.JitOptimization = true;
foreach (var attributeSection in syntaxTree.Children.OfType<AttributeSection>())
@ -120,10 +119,10 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -120,10 +119,10 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyCopyright", assemblyInfo.Copyright);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyTrademark", assemblyInfo.Trademark);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyDefaultAlias", assemblyInfo.DefaultAlias);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyVersion", assemblyInfo.AssemblyVersion, new Version(), true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyFileVersion", assemblyInfo.AssemblyFileVersion, new Version(), true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyInformationalVersion", assemblyInfo.InformationalVersion, new Version(), true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "Guid", assemblyInfo.Guid, Guid.Empty, true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyVersion", assemblyInfo.AssemblyVersion, null, true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyFileVersion", assemblyInfo.AssemblyFileVersion, null, true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "AssemblyInformationalVersion", assemblyInfo.InformationalVersion, null, true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "Guid", assemblyInfo.Guid, null, true);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "NeutralResourcesLanguage", assemblyInfo.NeutralLanguage);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "ComVisible", assemblyInfo.ComVisible, false);
SetAttributeValueOrAddAttributeIfNotDefault(syntaxTree, "CLSCompliant", assemblyInfo.ClsCompliant, false);

Loading…
Cancel
Save