Changeset 2209 for trunk/eraser


Ignore:
Timestamp:
6/19/2010 10:47:54 AM (4 years ago)
Author:
lowjoel
Message:

Define the GetFileVersion? assembly extension method to query assemblies for their file version (not manifest version, as previously used.) This is important since user-displayed versions should be file versions, not manifest versions used for module loading.

Location:
trunk/eraser
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.BlackBox/BlackBox.cs

    r2145 r2209  
    4545 
    4646using Eraser.Util; 
     47using Eraser.Util.ExtensionMethods; 
    4748using ProgressChangedEventHandler = Eraser.Util.ProgressChangedEventHandler; 
    4849using ProgressChangedEventArgs = Eraser.Util.ProgressChangedEventArgs; 
     
    191192                stream.WriteLine(separator); 
    192193                stream.WriteLine(string.Format(lineFormat, "Version", 
    193                     Assembly.GetEntryAssembly().GetName().Version)); 
     194                    Assembly.GetEntryAssembly().GetFileVersion())); 
    194195                StringBuilder commandLine = new StringBuilder(); 
    195196                foreach (string param in Environment.GetCommandLineArgs()) 
  • trunk/eraser/Eraser.Manager/Plugins.cs

    r2056 r2209  
    3131using System.Security.Cryptography; 
    3232using System.Security.Cryptography.X509Certificates; 
     33 
    3334using Eraser.Util; 
     35using Eraser.Util.ExtensionMethods; 
    3436 
    3537namespace Eraser.Manager.Plugin 
     
    438440 
    439441                AssemblyInfo info = new AssemblyInfo(); 
    440                 info.Version = assembly.GetName().Version; 
     442                info.Version = assembly.GetFileVersion(); 
    441443                IList<CustomAttributeData> attributes = CustomAttributeData.GetCustomAttributes(assembly); 
    442444                foreach (CustomAttributeData attr in attributes) 
  • trunk/eraser/Eraser.Util/Eraser.Util.csproj

    r2174 r2209  
    110110      <SubType>Component</SubType> 
    111111    </Compile> 
     112    <Compile Include="ExtensionMethods\Assembly.cs" /> 
    112113    <Compile Include="FileSize.cs" /> 
    113114    <Compile Include="Logger.cs" /> 
  • trunk/eraser/Eraser/Program.cs

    r2142 r2209  
    364364(c) 2008-2010 The Eraser Project 
    365365Eraser is Open-Source Software: see http://eraser.heidi.ie/ for details. 
    366 ", Assembly.GetExecutingAssembly().GetName().Version)); 
     366", BuildInfo.AssemblyFileVersion)); 
    367367 
    368368            PrintCommandHelp(); 
  • trunk/eraser/Eraser/SettingsPanel.cs

    r1981 r2209  
    2929using System.Windows.Forms; 
    3030 
     31using Microsoft.Win32; 
     32using System.Globalization; 
     33using System.Threading; 
     34 
    3135using Eraser.Manager; 
    3236using Eraser.Manager.Plugin; 
    33 using Microsoft.Win32; 
    34 using System.Globalization; 
    3537using Eraser.Util; 
    36 using System.Threading; 
     38using Eraser.Util.ExtensionMethods; 
    3739 
    3840namespace Eraser 
     
    7981            item.Group = e.Instance.LoadingPolicy == LoadingPolicy.Core ? 
    8082                pluginsManager.Groups[0] : pluginsManager.Groups[1]; 
    81             item.SubItems.Add(e.Instance.Assembly.GetName().Version.ToString()); 
     83            item.SubItems.Add(e.Instance.Assembly.GetFileVersion().ToString()); 
    8284            item.SubItems.Add(e.Instance.Assembly.Location); 
    8385            item.Tag = e.Instance; 
  • trunk/eraser/Eraser/UpdateForm.cs

    r1802 r2209  
    530530                HttpRequestCacheLevel.Revalidate); 
    531531            HttpWebRequest request = (HttpWebRequest)WebRequest.Create( 
    532                 new Uri("http://eraser.heidi.ie/scripts/updates?action=listupdates&version=6.1.0.0" /*+ 
    533                     Assembly.GetExecutingAssembly().GetName().Version.ToString()*/)); 
     532                new Uri("http://eraser.heidi.ie/scripts/updates?action=listupdates&version=" + 
     533                    BuildInfo.AssemblyFileVersion)); 
    534534 
    535535            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) 
Note: See TracChangeset for help on using the changeset viewer.