> > information from an assembly. Can someone provide me with an > > example that can retieve The information embedded by > > assemblyinfo.cs in both the executing assembly and an > > assembly in the GAC or on disc? > > Oh, and you can also do: > > System.Diagnostics.FileVersionInfo.GetVersionInfo( file ).FileVersion > > that will return x.x.x.x as a string. >
That technique returns the contents of the AssemblyFileVersion attribute, not the AssemblyVersion attribute. Both are useful, but they're not the same thing. AssemblyVersion (which your other response addressed) is what influences CLR assembly resolution for strongly named assemblies. AssemblyFileVersion as retrieved using the above call has no impact on managed assembly resolution, but is instead stored in the native VERSIONINFO resource that, for example, the Windows explorer displays if you select the file and view its properties. -Mike DevelopMentor http://staff.develop.com/woodring
