Version number without ClickOnce

Nemesis09

Active member
Joined
Jul 25, 2006
Messages
31
Location
NSW, Australia
Programming Experience
Beginner
Hi,

I've got a "Solution" that contains a single exe program and a windows installer setup which installs it and a few files it depends on. The problem is, I cant find anywhere where I can set the version number of the exe I made. The only way I can see to do this is using the "Publish" page on the "Properties" window, however this only takes effect if I "Publish" the program with clickonce.

I cant use ClickOnce, to install this software as it needs to be installed in the profram files folder. Like a normal program.

So, in short, is there any way I can set the version number and "Description" when installing with Windows Installer.

Thanks for any info.
 
That is where they have put it, it's just a link to the AssemblyInfo.vb file. The version numbers you set here are the versions that is applied to the file and assembly when it's built, they not versions for the ClickOnce package itself. Of course they put these options in this dialog because they are only related to publishing. You can easily verify this by setting versions, build the solution, and check file and assembly versions.

Versions you can check with exe properties in File Explorer, or in code Application.ProductVersion for file version and My.Application.Info.Version for assembly version.
 
Seems, logical...

But, on the applications tab the "Assembly Name" and "Root Namespace" are set to "TimeWatcher".

On the "Publish" tab the version is set to Major:1 Minor:0 Build:1 Rev:0

And the "Publish location" is set to "C:\Publish"

The output exe file however is version 1.0.0.0, with assembly version 1.0.0.0, With the description "WindowsApplication1"
 
You must rebuild and check the exe build file either from code or default location application/bin/debug, this has nothing to do with publish location.

'Assembly name' and 'description' is not the same thing.

Also remember to click 'save all' before you click rebuild so that all related files is saved before the other process rebuilds the application with all its related configuration files.
 
I assumed 'Assembly name' and 'description' werent the same thing, but Assembly name was set to "WindowsApplication1", which was the same as the description, so I thought it was worth a shot.

I have saved and rebuilt the exe several times after settings the version to 1.0.1.0 and the exe still shows 1.0.0.0, however all other changes I make to the program are there.

It currently "builds" to application/bin/release, not application/bin/debug.

Also, when I did use the Publish feature and installed with ClickOnce, the version number was correct. The problem is that I need it in Program Files because it uses the an apppath variable to access files in its folder, and ClickOnce seems not to have an install path...

I like the idea, with auto updates and the like, but I need an install directory.
 
Sorry, I tried again to make sure and the version stays at 1.0.0.0 even if I publish. But, using ClickOnce, the program does detect that a newer version is avaliable and updates properly and everything. But it still shows as 1.0.0.0

Is there any was I can set the install path for ClickOnce?

I found the install directory it uses in "local settings" but I really need it somewhere more friendly and I need to bundle files in the installer.

Is this possible with ClickOnce or should I stick with Windows Installer and do updates the hard way?
 
It currently "builds" to application/bin/release, not application/bin/debug.
I think you are mixing some files/settings here. Unless you have overridden the build paths found in Application settings, Compile tab, the application exe builds default for active configuration Debug to 'bin/debug' folder and for Release to 'bin\release' folder. If you change settings related to AssemblyInfo.vb this file must be saved before a rebuild. If a version number differs then you have one of these files/settings mixed up.

Also you don't have to check the correct physical file if you can't find it, just run the application and check the properties with My.Application.Info in code. When you 'run' the application from debugger all files are saved and assembly is rebuilt before it is executed.
 
Thats what I'm saying, the path in Build output path is "bin\Release\", but I didn't change it. Orriginally, it was "bin\Debug\" then it created the Release folder and sarted putting it there all on its own.

Also, the file version through right click > properties > version, and using

VB.NET:
MsgBox My.Application.Info.Version.ToString

both return 1.0.0.0.


But it definatley is saved before building as I've tried closing VB.NET all together and reopening the saved project. When I did this, and opened the "Publish" page, the version number is correct, but if I even if I rebuild the app from there the version stays at 1.0.0.0
 
I just opened the AssemblyInfo.vb file and set the file version, description, ect. in there then saved it and rebuilt the exe and everything is great, all the info I set is there in the exe. But its still completely irrelavant to any settings on the "Publish" tab.

Reguardless, I can set everything as I want now, and thats all that matters. I dont really care that I have to open the file and edit it directly, it seems to give greater control than the tab anyway.

Thanks for all your help.
 
But its still completely irrelavant to any settings on the "Publish" tab.
I don't quite see how I could not have understood that you didn't find the Assembly Information dialog before.. so my answers could have unintentionally misled you. The settings in AssemblyInfo.vb is the same as in the "Assembly Information" dialog accessed from Application tab in Application Properties. This was the dialog I referred to, and somehow actually where I though you changed versions. I know I said it was only related to publishing, but so is most of the tabs in Application Properties.

In the Publish tab (which is irrelevant here, yes) there is one version setting for the ClickOnce package itself, but no description setting as you mentioned, I think perhaps this confused me a bit from what you said, because in Assembly Information 'Description' is one of the fields.

Hope this clears things up and get you on track :)
 
Hey look! An Assembly Information dialogue!

...well, now it all makes sense.

Thats what I was looking for, sorry about the confusion and thanks for all your help.
 
Back
Top