473,785 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 45941
If you mean ClickOnce publish version:

if (System.Deploym ent.Application .ApplicationDep loyment.IsNetwo rkDeployed) {
System.Deployme nt.Application. ApplicationDepl oyment ad =
System.Deployme nt.Application. ApplicationDepl oyment.CurrentD eployment;
version = ad.CurrentVersi on;
// 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.Deploym ent' (are you missing an assembly reference?)
Here is my code.

private void frmMain_Load(ob ject sender, System.EventArg s e)
{
System.Deployme nt.Application. ApplicationDepl oyment ad =
System.Deployme nt.Application. ApplicationDepl oyment.CurrentD eployment;

this.Text = "Dealer Sales " & ad.CurrentVersi on;
}

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

if (System.Deploym ent.Application .ApplicationDep loyment.IsNetwo rkDeployed) {
System.Deployme nt.Application. ApplicationDepl oyment ad =
System.Deployme nt.Application. ApplicationDepl oyment.CurrentD eployment;
version = ad.CurrentVersi on;
// 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.Deployme nt.Application. ApplicationDepl oyment.CurrentD eployment.Curre n
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.Deployme nt namespace, Application or ApplicationDepl oyment?

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.Deployme nt.Internal


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

Just as Marc suggested, you can get your clickonce application's public
version by
System.Deployme nt.Application. ApplicationDepl oyment.CurrentD eployment.Curre n
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.Deployme nt namespace, Application or ApplicationDepl oyment?

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.Deployme nt.Internal


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

System.Deployme nt.Application.

I am not very clear what happened in your machine, have you referenced the
System.Deployme nt assembly in that winform project? I suugest you use
Object Browser(Ctrl+Al t+J) to explore the System.Deployme nt assembly, if
you cannot find System.Deployme nt.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.Deployme nt assembly was not referenced.

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


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

System.Deployme nt.Application.

I am not very clear what happened in your machine, have you referenced the
System.Deployme nt assembly in that winform project? I suugest you use
Object Browser(Ctrl+Al t+J) to explore the System.Deployme nt assembly, if
you cannot find System.Deployme nt.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
1325
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
11598
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
5455
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
6371
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) { System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
5
23171
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 version number. Ta in advance Barry
9
7644
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 be appreciated
1
8896
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 to put a label on my main form that displays the current revision? I'd just like a little label that literally says "1.0.0.7" so it's easy to see what version of the software my end user is using. Any thoughts? Let me know. Thanks!
6
13186
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 access the information. application.productversion doesn't seem to access/use the publish version.
1
10611
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 System.Version = My.Application.Deployment.CurrentVersion End If
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10152
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8974
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.