index > ClickOnce and Setup & Deployment Projects > publishversion vs productversion

publishversion vs productversion

I am not really sure about publishversion (in clickonce) and (application.)productversion. When do I use each one?

Should these be identical for application releases?

if I want to display version information under help | about, I think it would be preferable to use publishversion. Is this right? How do I do this?

Am I supposed to manually set them to be the same?

Thanks

Zaph0d

They are seperate version numbers.   Product verison is the version of the actual binary deployed, publish version is the higher level version # for this deployment of the application.   It usually makes sense to keep them in sync, but you don't have to.  

If the application is deployed via ClickOnce, I would recommend displaying the publish version.  

Jamie Cool
I am using ClickOnce. How do I access the publish version through code?

How do I change the product version anyway? The assemblyinfo.cs file contains

[assembly: AssemblyVersion("1.0.*")]

my app version is currently 1.0.19.19234 or something. How do I change this?

Do I have to manually sync them, or can it be automated?

I think I really need some sort of overview, but cannot find one on MSDN.

Thanks

Zaph0d
System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion will give you the deployment/publish version.

There is now UI in VS for the productversion.   Project Properties->Application Tab->Assembly Information.
Jamie Cool

The problem I see with this is that it looks like the line:

System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString

Will error in the debug, simply because the application is not installed. Yet the information on the last published version is available in the Publish tab. Anyone know how to tell if the code is being run in the debug environment so that this can be "IF'd" out.

thanks

bigboyc

Is there any way it can be kept in sync?

I don't like the idea that the publish version revision is incrementing but the assembly version revision is not. What if I publish twice a day and assembly version will be the same but publish version will not be and there will be a breaking change. Won't it bind to an incompatible assembly? Should I just avoid setting revision for AssemblyVersion? But then 1.1.60118.0 looks ugly with the zero at the end..

Thanks!
RGab

RGabo
You could probably write a Macro that would keep them in sync.


David Guyer - Deployment Technologies Group QA
David Guyer MS
reply 7

You can use google to search for other answers

 

More Articles

• How to access the publish version in the software?
• Deployment: "Manufacturer" in installation path AND in ...
• Deployment tools: software keys & obfuscation
• MSI run from VS setup.exe is not themed
• How to add custom prerequisite for ClickOnce?
• ClickOnce, Application Settings and Configurations
• How can I get and set multiple context parameter(Context.Paramete...
• Manual deployment using Mage.exe and MageUI.exe
• what functionality should be included in the client download?
• Truely Automatic Updates?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Test Certificate Signing problem
• smart client - file upload - security se
• International Deployment & Prerequis
• Application not found
• Getting the current website address Inte
• Updater Application Block, No-Touch &
• Microphone Problem on Vista
• All Users and Admin Rights
• How to get [SourceDir]
• How can i attach a file to install durin
• How to get the path to the install CD
• Conditional Dialogs in deployment project
• Setup for apps written with vb 2k5 express
• Using Microsoft.Build.Tasks.Deployment.M
• VS2005 MSI projects + Dependancy problems.

Hot Articles

• Setup Project - Install Even If Existing
• J# Deployment Problem
• ClickOnce Error When Publishing: PathToo
• clickonce install problems
• help with deployment - mshtml.dll
• cannot deploy my OCX
• Actually Click once will install or copy
• Smart Client - Data Centric - SQL 2K to
• User Cannot Delete Shortcut?
• Updating files with mage.exe doesn't work
• The located assembly's manifest definiti
• How to edit the application manifest file?
• Do user app settings get overwritten whe
• My.Settings System.OutofmemoryException
• Web Services in Win Forms

Recommend Articles

• Installing 2 versions of the same applic
• Application.exe.config
• Cannot run the application on web
• How to prevent the deletion of the old f
• Output
• Combining ClickOnce and MSI Installer
• No touch deployment - offline question.
• Publishing a C# Application
• add value to registry
• activation error: IndexOutOfRangeExcept
• Mage.exe and Deployment crisis
• ClickOnce Deployment URL error
• Form focus problems
• Error On Install
• Execute and script agains a database in