title: C# AssemblyFileVersion usage within a program
body: <p>I'm working on a program, and I'm trying to display the assembly <em>FILE</em> version </p>
  
  <pre><code>    public static string Version
      {
          get
          {
              Assembly asm = Assembly.GetExecutingAssembly();
              FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(asm.Location);
              return String.Format("{0}.{1}", fvi.FileMajorPart, fvi.FileMinorPart);
          }
      }
  </code></pre>
  
  <p>At the moment, this only returns the first two version numbers in the "AssemblyVersion", not "AssemblyFileVersion." I'd really like to just reference the AssemblyFileVersion rather than store an internal variable called "Version" that I have to update both this and the assembly version...</p>
  
  <pre><code>[assembly: AssemblyVersion("1.0.*")]
  [assembly: AssemblyFileVersion("3.5.0")]
  </code></pre>
  
  <p>That's my AssemblyFileVersion from AssemblyInfo.cs. I'd like to just reference the "3.5.x" part, not the "1.0.*" :/</p>
  
  <p>Thanks,
  Zack</p>