FileVersionInfo.GetVersionInfo for outlook add in

  • Thread starter Thread starter semedao
  • Start date Start date
S

semedao

Hi ,

I am looking for the simple way to get the FileVersionInfo.GetVersionInfo

for outlook add in - for the host com

also I want to know how to get it in:

Console application and in Service application

in Windows forms I have the

Application.ExecutablePath , but I don't find the same thing forother
application types



thanks
 
Hi Semedao,

I'm not very clear about what do you mean by "simple way" to get
FileVersionInfo.GetVersionInfo for outlook addin. Do you mean how to get
the full path of the assembly and pass to GetVersionInfo()?

To get an assembly's full path, use following code:

System.Reflection.Assembly current =
System.Reflection.Assembly.GetExecutingAssembly();
string exe = current.GetModules()[0].FullyQualifiedName;
FileVersionInfo fi = FileVersionInfo.GetVersionInfo(exe);
Console.WriteLine(exe);
Console.WriteLine(fi.FileVersion);

I guess this also answers your second question.

Please let me know if I misunderstood your question or you need further
information.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top