473,414 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Display Publish Version

I want frmMain.text to show the current publish version.
What is the code to get the current publish version?

For example.
frmMain.text = "My Application Version: " & project.publish.version

But I don't know how to call the project.publish.version numbers.

Feb 14 '06 #1
7 45880
If you mean ClickOnce publish version:

if (System.Deployment.Application.ApplicationDeployme nt.IsNetworkDeployed) {
System.Deployment.Application.ApplicationDeploymen t ad =
System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment;
version = ad.CurrentVersion;
// blah...
}

Or what do you mean?

Marc
Feb 14 '06 #2
I tried your code but errors out.

Error 3 The type or namespace name 'Application' does not exist in the
namespace 'System.Deployment' (are you missing an assembly reference?)
Here is my code.

private void frmMain_Load(object sender, System.EventArgs e)
{
System.Deployment.Application.ApplicationDeploymen t ad =
System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment;

this.Text = "Dealer Sales " & ad.CurrentVersion;
}

"Marc Gravell" wrote:
If you mean ClickOnce publish version:

if (System.Deployment.Application.ApplicationDeployme nt.IsNetworkDeployed) {
System.Deployment.Application.ApplicationDeploymen t ad =
System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment;
version = ad.CurrentVersion;
// blah...
}

Or what do you mean?

Marc

Feb 14 '06 #3
Hi,

Just as Marc suggested, you can get your clickonce application's public
version by
System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment.Curren
tVersion property.

According to your error message, would you please tell me which the version
of Visual Studio 2005 you used? What intellisence do you get under the
System.Deployment namespace, Application or ApplicationDeployment?

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Feb 15 '06 #4
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41778
Microsoft Visual Basic 2005

Microsoft Visual C# 2005 77626-009-0000007-41778
Microsoft Visual C# 2005

Microsoft Visual C++ 2005 77626-009-0000007-41778
Microsoft Visual C++ 2005

Microsoft Visual J# 2005 77626-009-0000007-41778
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005 77626-009-0000007-41778
Microsoft Visual Web Developer 2005

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005


I get System.Deployment.Internal


""Gary Chang[MSFT]"" wrote:
Hi,

Just as Marc suggested, you can get your clickonce application's public
version by
System.Deployment.Application.ApplicationDeploymen t.CurrentDeployment.Curren
tVersion property.

According to your error message, would you please tell me which the version
of Visual Studio 2005 you used? What intellisence do you get under the
System.Deployment namespace, Application or ApplicationDeployment?

Thanks!

Best regards,

Gary Chang
Microsoft Community Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Feb 16 '06 #5
Hi,
I get System.Deployment.Internal


Your .NET Framework 2.0 and Visual Studio 2005's version is OK, but there
should be another namespace under System.Deployment:

System.Deployment.Application.

I am not very clear what happened in your machine, have you referenced the
System.Deployment assembly in that winform project? I suugest you use
Object Browser(Ctrl+Alt+J) to explore the System.Deployment assembly, if
you cannot find System.Deployment.Application namespace in it, your
machine's .NET Framework 2.0 may be corruptted.
Thanks!

Best regards,

Gary Chang
Microsoft Community Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Feb 17 '06 #6
No, the System.Deployment assembly was not referenced.

Once I referenced it, it worked. Thanks.
""Gary Chang[MSFT]"" wrote:
Hi,
I get System.Deployment.Internal


Your .NET Framework 2.0 and Visual Studio 2005's version is OK, but there
should be another namespace under System.Deployment:

System.Deployment.Application.

I am not very clear what happened in your machine, have you referenced the
System.Deployment assembly in that winform project? I suugest you use
Object Browser(Ctrl+Alt+J) to explore the System.Deployment assembly, if
you cannot find System.Deployment.Application namespace in it, your
machine's .NET Framework 2.0 may be corruptted.
Thanks!

Best regards,

Gary Chang
Microsoft Community Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Feb 23 '06 #7
That's great, have a nice weekend!

Best regards,

Gary Chang
Microsoft Community Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Feb 24 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wilfried Mestdagh | last post by:
Hi, How to get in code the "publish version" of an application. Seems Assembly version is not the same as publish version. -- rgds, Wilfried http://www.mestdagh.biz
9
by: Rich | last post by:
Please help. Looking for a script to detect and display what version of Windows a user is running. Thanks in advance. Rich
2
by: Steven Spits | last post by:
Hi, Is it possible to show the publish version in a app that is deployed using ClickOnce? Assembly.GetExecutingAssembly().GetName().Version shows the assembly version... Steven
4
by: Mike L | last post by:
Error occurs on "System.Deployment.Application.ApplicationDeployment.CurrentDeployment" ** Here is my code private void frmMain_Load(object sender, System.EventArgs e) {...
5
by: barrysmith1966 | last post by:
Hello, I am using VS2005 and the publish feature. Is there any way I get the version number from within my application? i.e. I have a splash screen and would like to display the latest...
9
by: Zim Babwe | last post by:
Doesn't anyone display the version and revision number in their VB.NET application on the "about" screen or somewhere else? I need to know how to display that information also. Any help would...
1
by: igendreau | last post by:
Simple question... Using Visual Studio 2005 to create a small app. Under my project properties, publish tab, I have it auto incrementing the revision number every time I publish. Is there any way...
6
by: Aussie Rules | last post by:
Hi, I use the publish feature within Vs.net 2008, and have it set to increment on each build/publish I want to be able to display this as my application version number, but can not see how to...
1
by: Peter Hentrich | last post by:
Dean, You can retrieve the "publish version" number from the Project Settings using this: If (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) Then Dim verDeployed As...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.