[Mono-dev] How to get the assembly version?

Fernando López ferrucosboy at gmail.com
Wed May 3 15:37:17 EDT 2006


 Hi,

In my AssemblyInfo.cs, I have changed the version number to 1.0.0.0:

[assembly: AssemblyVersion("1.0.0.0")]

I'm trying to get the assembly version using the next code:

m_majorPart = System.Diagnostics.FileVersionInfo.GetVersionInfo(
System.Reflection.Assembly.GetExecutingAssembly
().Location).ProductMajorPart;
m_minorPart = System.Diagnostics.FileVersionInfo.GetVersionInfo(
System.Reflection.Assembly.GetExecutingAssembly
().Location).ProductMinorPart;
m_buildPart = System.Diagnostics.FileVersionInfo.GetVersionInfo(
System.Reflection.Assembly.GetExecutingAssembly
().Location).ProductBuildPart;

But I'm always getting the wrong value 0.0.0.0

Is this a bug? What do I have to do with it?

Thanks in advance.

Best regards from San Luis Potosi (Mexico).

Rafael Lopez.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060503/eb6d599a/attachment.html 


More information about the Mono-devel-list mailing list