Return Version from a deployment project

B

BICOAKRON

Is there a way to return the value from the version property of a deploy
project. I know it shows in the registry and in add/remove when you click
details. Trying to add this version # on the main screen of our production
app we created in VB. I use this since we have the deploy remove previous
version. I have seen how to grab it from assemblyinfo.vb but it doesn't
match the one we enter in deploy property unless we hard code it. Don't
really want to have to change it in 2 places.
 
S

Stewart Berman

According to:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEV.v10.en/dndotnet/html/managevers.htm

"One of the key features of Visual Basic .NET is that there is no hidden information. When you
create a new application using Visual Basic .NET, a module named AssemblyInfo.vb is automatically
added to your project. This module contains settings for assembly attributes, the Microsoft .NET
equivalent of project properties. Among these you will find such items as the title, description,
and company name to be used in the final executable or .dll file created from this project. The
AssemblyInfo.vb module also contains a line that sets the version number. By default, this is:

<Assembly: AssemblyVersion("1.0.*")>
Version numbers in Microsoft .NET have four parts:

Major part
Minor part
Build part
Revision part
Setting the Assembly Version attribute to "1.0.*" tells Visual Basic .NET to use 1 for the major
part, 0 for the minor part, and to come up with build and revision part numbers automatically. In
this case, Microsoft .NET will assign an arbitrary build part and an arbitrary revision part, and it
will change the revision part each time you rebuild the assembly."

Now that is the same description as the Publish Version of the application.

Unfortunately, that appears to be broken in that if you specify a wildcard for the Build part (as
shown above) you will be zeros for the build and revision values no matter what they actually are on
Publish screen or how many times you rebuild the entire application.

The version number that shows in the details of Add/Remove Programs is not the same as the version
number that shows if you right click on the executable, select Properties and click on the Version
tab. That information is in the .exe.manifest file.
 
B

BICOAKRON

So does that mean I cannot grab the version from the deploy that shows ina
add/remove?
 

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

Top