Browse Source

Replace FileVersionInfo.GetVersionInfo with DecompilerVersionInfo.Version constant (#3667)

pull/3669/head
Matt Parker 1 month ago committed by GitHub
parent
commit
69659450a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs
  2. 2
      ICSharpCode.Decompiler/Properties/AssemblyInfo.cs
  3. 1
      ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs

4
ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs

@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.DebugInfo @@ -43,7 +43,7 @@ namespace ICSharpCode.Decompiler.DebugInfo
{
public class PortablePdbWriter
{
static readonly FileVersionInfo decompilerVersion = FileVersionInfo.GetVersionInfo(typeof(CSharpDecompiler).Assembly.Location);
const string decompilerVersion = DecompilerVersionInfo.Version;
public static bool HasCodeViewDebugDirectoryEntry(PEFile file)
{
@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.DebugInfo @@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.DebugInfo
// Generate source and checksum
if (!noLogo)
syntaxTree.InsertChildAfter(null, new Comment(" PDB and source generated by ICSharpCode.Decompiler " + decompilerVersion.FileVersion), Roles.Comment);
syntaxTree.InsertChildAfter(null, new Comment(" PDB and source generated by ICSharpCode.Decompiler " + decompilerVersion), Roles.Comment);
var sourceText = SyntaxTreeToString(syntaxTree, settings);
// Generate sequence points for the syntax tree

2
ICSharpCode.Decompiler/Properties/AssemblyInfo.cs

@ -14,7 +14,7 @@ using System.Runtime.InteropServices; @@ -14,7 +14,7 @@ using System.Runtime.InteropServices;
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
[assembly: AssemblyVersion(DecompilerVersionInfo.Major + "." + DecompilerVersionInfo.Minor + "." + DecompilerVersionInfo.Build + "." + DecompilerVersionInfo.Revision)]
[assembly: AssemblyVersion(DecompilerVersionInfo.Version)]
[assembly: AssemblyInformationalVersion(DecompilerVersionInfo.FullVersionWithCommitHash)]
[assembly: InternalsVisibleTo("ICSharpCode.Decompiler.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001004dcf3979c4e902efa4dd2163a039701ed5822e6f1134d77737296abbb97bf0803083cfb2117b4f5446a217782f5c7c634f9fe1fc60b4c11d62c5b3d33545036706296d31903ddcf750875db38a8ac379512f51620bb948c94d0831125fbc5fe63707cbb93f48c1459c4d1749eb7ac5e681a2f0d6d7c60fa527a3c0b8f92b02bf")]

1
ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.template.cs

@ -6,6 +6,7 @@ public static class DecompilerVersionInfo @@ -6,6 +6,7 @@ public static class DecompilerVersionInfo
public const string Revision = "$INSERTREVISION$";
public const string VersionName = "preview3";
public const string Version = Major + "." + Minor + "." + Build + "." + Revision;
public const string FullVersion = Major + "." + Minor + "." + Build + ".$INSERTREVISION$$INSERTBRANCHPOSTFIX$$INSERTVERSIONNAMEPOSTFIX$";
public const string FullVersionWithShortCommitHash = FullVersion + "+$INSERTSHORTCOMMITHASH$";
public const string FullVersionWithCommitHash = FullVersion + "+$INSERTCOMMITHASH$";

Loading…
Cancel
Save