Programmatically Setting the Version of a Window's Service on the ProjectInstaller

Posted by user302004 on Stack Overflow See other posts from Stack Overflow or by user302004
Published on 2010-06-04T13:12:22Z Indexed on 2010/06/09 18:32 UTC
Read the original article Hit count: 150

Filed under:

I have a Windows Service created in Visual Studio 2005 in C#. I have a setup project and a ProjectInstaller class. I also have code to programmatically get the version from the AssemblyFileVersionAttribute.

I need to figure out where I set the version that I've obtained (and where this code should go). I tried placing it in the InitializeComponent method on ProjectInstaller.Designer.cs and then appending the version to serviceInstaller1.DisplayName and serviceInstaller1.ServiceName. This didn't work and you're not supposed to modify the contents of this method.

Any ideas?

© Stack Overflow or respective owner

Related posts about c#