473,732 Members | 2,227 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 2267
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
3481
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
11832
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
4660
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
3268
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
2469
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
1282
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
1981
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
2899
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
750
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
8946
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
8774
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
9307
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
9181
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
8186
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...
0
6031
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
4550
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...
1
3261
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
3
2180
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.