List Info

Thread: C-Sharp (C#) Group: Get exe file version




C-Sharp (C#) Group: Get exe file version
user name
2006-05-02 14:21:38
Hello, I'm writing a little C# application. I need to read
exe's file
version. I mean when you right click the file on windows
explorer,
there's a Version tab. On that tab you can see a version
number, I need
this value. How can I get it?

Thank's 

Pablo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: Get exe file version
user name
2006-05-04 07:50:43
Hi Pablo

You need to that with Reflection.

string assembly = "your assembly path here";
AssemblyName myAssemblyName =
AssemblyName.GetAssemblyName(assembly );
Console.WriteLine("\nDisplaying the assembly
information of ''\n",
assembly );
Console.WriteLine(myAssemblyName.Version.ToString( ));

Best Regards Ivo

On 5/2/06, Pablo <lernerpablogmail.com> wrote:
>
> Hello, I'm writing a little C# application. I need to
read exe's file
> version. I mean when you right click the file on
windows explorer,
> there's a Version tab. On that tab you can see a
version number, I need
> this value. How can I get it?
>
> Thank's
>
> Pablo
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: Get exe file version
user name
2006-05-04 09:22:13
That will only work for CLR assemblies. If you want to get the version number of a native assembly you need to use extern to version.dll. Example 3 on http://msdn.microsoft.com/library/en-us/csref/html/vcwlkUnsafeCodeTutorial.asp?frame=true shows you how to do just that.

Liam

On 5/4/06, Ivo Looser <gmail.com">ivo.loosergmail.com> wrote:

Hi Pablo

You need to that with Reflection.

string assembly = "your assembly path here";
AssemblyName myAssemblyName = AssemblyName.GetAssemblyName(assembly );
Console.WriteLine("\nDisplaying the assembly information of ''\n&quot;,
assembly );
Console.WriteLine(myAssemblyName.Version.ToString( ));

Best Regards Ivo

On 5/2/06, Pablo <gmail.com">lernerpablogmail.com> wrote:
>;
> Hello, I'm writing a little C# application. I need to read exe's file
> version. I mean when you right click the file on windows explorer,
> there's a Version tab. On that tab you can see a version number, I need
> this value. How can I get it?
>
&gt; Thank's
&gt;
> Pablo
>
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: Get exe file version
user name
2006-05-04 19:49:48
This looks like what i want. Thank's

pablo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

C-Sharp (C#) Group: Re: Get exe file version
user name
2006-05-04 19:47:15
Thank's but I need to read from any file. Not just from
.net developed
files.

regards, Pablo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C-Sharp (C#)" group.
To post to this group, send email to C_Sharpgooglegroups.com
To unsubscribe from this group, send email to
C_Sharp-unsubscribegooglegroups.com
For more options, visit this group at http://groups.
google.com/group/C_Sharp
-~----------~----~----~----~------~----~------~--~---

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )