473,614 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying Version Number

I have been using this code to display the version number, and this has
worked well, but I am now changing from using the ClickOnce publishing to a
proper setup project, and this no longer works.

If System.Diagnost ics.Debugger.Is Attached = False Then
Version.Text = "Version : " &
My.Application. Deployment.Curr entVersion.ToSt ring()
Else
Version.Text = "Debug Mode"
End If

Any suggestions?

TIA
Phil
Jun 27 '08 #1
14 2249
See for example My.Application. Info.Version.To String

--
Patrice
"Phil" <N/Aa écrit dans le message de groupe de discussion :
w-*************** *************** @posted.plusnet...
I have been using this code to display the version number, and this has
worked well, but I am now changing from using the ClickOnce publishing to
a
proper setup project, and this no longer works.

If System.Diagnost ics.Debugger.Is Attached = False Then
Version.Text = "Version : " &
My.Application. Deployment.Curr entVersion.ToSt ring()
Else
Version.Text = "Debug Mode"
End If

Any suggestions?

TIA
Phil
Jun 27 '08 #2
See for example My.Application. Info.Version.To String

That only gives the version of the individual assembly which is not the same
thing.
Jun 27 '08 #3
My understanding is that you don't use anymore clickonce so AFAIK you can't
have the deployment version if this is what you are after. (do you have an
error because deployment is nothing. You could also use the
IsNetworkDeploy ed property to see if this is click once installation).

A a side note .NET 3.5 SP1 (currently as a beta) seems to introduce new
capabilities for ClickOnce deployment but if you don't use ClickOnce anymore
you'll have to use the version of your app (you can also control this by
hand in an assemblyinfo file).

--
Patrice

"Phil" <N/Aa écrit dans le message de groupe de discussion :
3c************* *************** **@posted.plusnet...
>See for example My.Application. Info.Version.To String

That only gives the version of the individual assembly which is not the
same thing.
Jun 27 '08 #4

"Patrice" <http://www.chez.com/scribe/wrote in message
news:DC******** *************** ***********@mic rosoft.com...
My understanding is that you don't use anymore clickonce so AFAIK you
can't have the deployment version if this is what you are after. (do you
have an error because deployment is nothing.
Yes, that is exactly the issue. The deployment object is nothing because it
is only relevant for clickOnce deployment. I am looking for a way to get the
equivalent information from the setup project that I am now using instead of
the clickOnce deployment.
You could also use the IsNetworkDeploy ed property to see if this is click
once installation).
I have decided I need a little more flexibility than the click once system
allows, so am developing a setup project instead, so I can safely assume now
that it will not be a click once deployment.
>
A a side note .NET 3.5 SP1 (currently as a beta) seems to introduce new
capabilities for ClickOnce deployment
Something for the future perhaps.
but if you don't use ClickOnce anymore you'll have to use the version of
your app (you can also control this by hand in an assemblyinfo file).
My application though consists of a number of different assemblies, each of
which will have their own version number.
I guess it's the version number of the setup project that I want to display.
Is there any mechanism built-in to allow me access to this from within the
deployed assemblies? or will I need to somehow build this functionality into
the setup project myself?

Thanks for your assistance.
Phil.
Jun 27 '08 #5
On May 14, 2:29*pm, "Phil" <N/Awrote:
"Patrice" <http://www.chez.com/scribe/wrote in message

news:DC******** *************** ***********@mic rosoft.com...
My understanding is that you don't use anymore clickonce so AFAIK you
can't have the deployment version if this is what you are after. (do you
have an error because deployment is nothing.

Yes, that is exactly the issue. The deployment object is nothing because it
is only relevant for clickOnce deployment. I am looking for a way to get the
equivalent information from the setup project that I am now using instead of
the clickOnce deployment.
You could also use the IsNetworkDeploy ed property to see if this is click
once installation).

I have decided I need a little more flexibility than the click once system
allows, so am developing a setup project instead, so I can safely assume now
that it will not be a click once deployment.
A a side note .NET 3.5 SP1 (currently as a beta) seems to introduce new
capabilities for ClickOnce deployment

Something for the future perhaps.
but if you don't use ClickOnce anymore you'll have to use the version of
your app (you can also control this by hand in an assemblyinfo file).

My application though consists of a number of different assemblies, each of
which will have their own version number.
I guess it's the version number of the setup project that I want to display.
Is there any mechanism built-in to allow me access to this from within the
deployed assemblies? or will I need to somehow build this functionality into
the setup project myself?

Thanks for your assistance.
Phil.
Phil,
I'm not sure if it's your solution, but have you considered
System.Reflecti on namespace that provides GetExecutingAss embly method
to get info about current assembly:

System.Reflecti on.Assembly.Get ExecutingAssemb ly()GetName().V ersion.ToString ()

Thanks,

Onur Güzel
Jun 27 '08 #6
On May 14, 2:47*pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
On May 14, 2:29*pm, "Phil" <N/Awrote:


"Patrice" <http://www.chez.com/scribe/wrote in message
news:DC******** *************** ***********@mic rosoft.com...
My understanding is that you don't use anymore clickonce so AFAIK you
can't have the deployment version if this is what you are after. (do you
have an error because deployment is nothing.
Yes, that is exactly the issue. The deployment object is nothing becauseit
is only relevant for clickOnce deployment. I am looking for a way to getthe
equivalent information from the setup project that I am now using instead of
the clickOnce deployment.
You could also use the IsNetworkDeploy ed property to see if this is click
once installation).
I have decided I need a little more flexibility than the click once system
allows, so am developing a setup project instead, so I can safely assumenow
that it will not be a click once deployment.
A a side note .NET 3.5 SP1 (currently as a beta) seems to introduce new
capabilities for ClickOnce deployment
Something for the future perhaps.
but if you don't use ClickOnce anymore you'll have to use the version of
your app (you can also control this by hand in an assemblyinfo file).
My application though consists of a number of different assemblies, eachof
which will have their own version number.
I guess it's the version number of the setup project that I want to display.
Is there any mechanism built-in to allow me access to this from within the
deployed assemblies? or will I need to somehow build this functionality into
the setup project myself?
Thanks for your assistance.
Phil.

Phil,
I'm not sure if it's your solution, but have you considered
System.Reflecti on namespace that provides GetExecutingAss embly method
to get info about current assembly:

System.Reflecti on.Assembly.Get ExecutingAssemb ly()GetName().V ersion.ToString *()

Thanks,

Onur Güzel- Hide quoted text -

- Show quoted text -
Correcting, missed the "dot" before GetName:

System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetName(). Version.ToStrin g*
()

Thanks,

Onur
Jun 27 '08 #7
But you could deploy an update but just replacing the exe file for example.
IMO your best bet if you are not using clickonce (i.e. you have less control
on the publication/update process on the client machine) is to use the
version number fo the main assembly (as suggested earlier).

If needed you could even get the version number of each and every assembly
that compose your application...

--
Patrice

"Phil" <N/Aa écrit dans le message de groupe de discussion :
Be************* *************** **@posted.plusnet...
>
"Patrice" <http://www.chez.com/scribe/wrote in message
news:DC******** *************** ***********@mic rosoft.com...
>My understanding is that you don't use anymore clickonce so AFAIK you
can't have the deployment version if this is what you are after. (do you
have an error because deployment is nothing.

Yes, that is exactly the issue. The deployment object is nothing because
it is only relevant for clickOnce deployment. I am looking for a way to
get the equivalent information from the setup project that I am now using
instead of the clickOnce deployment.
>You could also use the IsNetworkDeploy ed property to see if this is click
once installation).

I have decided I need a little more flexibility than the click once system
allows, so am developing a setup project instead, so I can safely assume
now that it will not be a click once deployment.
>>
A a side note .NET 3.5 SP1 (currently as a beta) seems to introduce new
capabilities for ClickOnce deployment

Something for the future perhaps.
>but if you don't use ClickOnce anymore you'll have to use the version of
your app (you can also control this by hand in an assemblyinfo file).

My application though consists of a number of different assemblies, each
of which will have their own version number.
I guess it's the version number of the setup project that I want to
display. Is there any mechanism built-in to allow me access to this from
within the deployed assemblies? or will I need to somehow build this
functionality into the setup project myself?

Thanks for your assistance.
Phil.
Jun 27 '08 #8
But you could deploy an update but just replacing the exe file for
example. IMO your best bet if you are not using clickonce (i.e. you have
less control on the publication/update process on the client machine) is
to use the version number fo the main assembly (as suggested earlier).

If needed you could even get the version number of each and every assembly
that compose your application...
True, and I do intend to provide something on an about page listing all the
individual assembly versions, but for the main splash screen I just want the
overall version of the system. There is a version number in the setup
project, I'm sure there must be a way of making this available to the
installed aplication.
Jun 27 '08 #9
I'm not sure if it's your solution, but have you considered
System.Reflecti on namespace that provides GetExecutingAss embly method
to get info about current assembly:
Thanks, but it's not the assembly version that I'm after. I want to display
the version of the setup project that was used to install the assembly.
For click-once deployed applications I can use:
My.Application. Deployment.Curr entVersion
I'm looking for the equivalent when a Setup Project has been used.
Jun 27 '08 #10

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

Similar topics

3
3474
by: Dalan | last post by:
At first I was not certain what could cause Access 97 from displaying most jpeg images, but not all. After further testing, it seemed that all original images of less than 275 pixels per inch or less would display, but those close to 300 pixels/inch or greater would not (MS Access cannot recognize the file format xxx.jpg). The larger, original images were scanned and saved as .bmp (at 300 dpi producing a 15MB file). Then the images were...
7
11823
by: Joe | last post by:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource (using Oracle ODBC drivers). After linking the tables in Access, I inspect the data contained in the linked tables. For tables that involve a number field as the primary key, the data is returned successfully. For tables that involve a character field (e.g. CHAR(3) or VARCHAR(10)) as the primary key, I have the correct number of rows returned, but the data displayed...
3
4654
by: Lyn | last post by:
I need some guidance for a technique that will allow me to accomplish the following... I have a table in which each record contains a photograph. I would like to display in a form a thumbnail size version of each photograph horizontally across the form, then have the photgraphs "word wrap" (picture wrap ?) at the right end of the form onto the next "line" of photographs. Does anyone know how this can be done? Obviously, displaying...
7
3261
by: Susan Bricker | last post by:
Sorry..I keep hitting the wrong key and sending the post too soon... The problem: COMBOBOX not displaying all possible rows. The RecordSource (generated by SQL view of the Query Builder) is: SELECT tblTPSTeam.empID, & " " & AS ReqAnalyst FROM tblTPSTeam ORDER BY tblTPSTeam.lname; I have gone to Form Design and displayed the RecordSource of the
4
2466
by: bissatch | last post by:
Hi, I have launched my new website and having viewing it on the Mac Internet Explorer, have found that it isnt displaying my background-image property. Is this a common bug / occurance? How are background-image properties displayed on the Mac IE? Cheers Burnsy
0
1274
by: anjachow | last post by:
The system generated email that are automatically sent displaying well in any web-based mail systems (yahoo, msn, etc...). The foreign characters (vowels with accents and the ñ) aren't displaying correctly. The foreign caracters do display correctly in OUTLOOK however. póliza is coming as póliza this is the code <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet <!ENTITY nbsp "*">]> <xsl:stylesheet...
6
1973
by: lejason | last post by:
I am having trouble with a really simple problem! haha. How do you display that data from on xml file. Here is my xml file called "test.xml" <?xml version="1.0" encoding="iso-8859-1"?> <test> <person> <name>Jason</name> <color>blue</color> <number>16</number>
13
2887
by: David W. Fenton | last post by:
I've been struggling the last two days with something I thought was very easy, which is to open a web page with a form on it and populate the form with data passed in a query string (either POST or GET). I got Application.FollowHyperlink *kind* of working, but was having problem with double encoding of some characters (I had to do special things with + signs in the data, as well as never figuring out why some data was getting...
0
746
by: Stefan Uhlemann | last post by:
Hi, Since i have installed VS 2008 SP1 (and .NET Framework 3.5 SP1) there are strange issuses and errors displaying my webcontrols. If i recompile the second project (with the controls) - the main project can not display any of the controls anymore (Small gray window with red error message). I have to close the whole solution, change the version number of my second project (dll), recompile it, open solution and it works until i...
0
8179
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8621
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8576
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...
1
8272
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5538
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
4049
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4119
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2565
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
0
1421
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.