472,364 Members | 2,043 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 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 45654
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
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.