473,320 Members | 1,707 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,320 software developers and data experts.

how to set the Application.ProductVersion

Hi,
How do I set the application productversion. I can see in the publish
section where I can set it, but no matter what I set this to, the
productversion is different

Thanks
Oct 25 '06 #1
5 15124
With
System.Diagnostics.FileVersionInfo.GetVersionInfo( System.Reflection.Assembly.GetExecutingAssembly.Lo cation)
m_ver = .FileMajorPart & "." & .FileMinorPart & "." & .FileBuildPart &
"." & .FilePrivatePart
lblVersion.Text = m_ver
End With
"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:e5****************@TK2MSFTNGP03.phx.gbl...
Hi,
How do I set the application productversion. I can see in the publish
section where I can set it, but no matter what I set this to, the
productversion is different

Thanks

Oct 25 '06 #2
Hi,

This looks like code to get the version...

How do I set the value of .fileMajorPart etc ?

Thanks
"Steve Long" <St**********@NoSpam.comwrote in message
news:OO****************@TK2MSFTNGP02.phx.gbl...
With
System.Diagnostics.FileVersionInfo.GetVersionInfo( System.Reflection.Assembly.GetExecutingAssembly.Lo cation)
m_ver = .FileMajorPart & "." & .FileMinorPart & "." & .FileBuildPart &
"." & .FilePrivatePart
lblVersion.Text = m_ver
End With
"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:e5****************@TK2MSFTNGP03.phx.gbl...
>Hi,
How do I set the application productversion. I can see in the publish
section where I can set it, but no matter what I set this to, the
productversion is different

Thanks


Oct 25 '06 #3
"Aussie Rules" <Au*********@nospam.nospamschrieb:
How do I set the application productversion. I can see in the publish
section where I can set it, but no matter what I set this to, the
productversion is different
In solution explorer select "My Project" -"Application" -"Assembly
information...".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 25 '06 #4
Hi Aussie,

ProductVersion first looks to see if the assembly containing the main
executable has the AssemblyInformationalVersion attribute on it. If this
attribute exists, it is used for both ProductVersion and CommonAppDataPath.
If this attribute does not exist, both properties use the version of the
executable file instead.

So, in your project, open the AssemblyInfo.cs file. In this file, I added a
line like this

[assembly: AssemblyInformationalVersion("4.0.0.0")]

The product version will be set to 4.0.0.0.

For more information, please check the following link:

http://msdn2.microsoft.com/en-us/lib...application.pr
oductversion.aspx

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 26 '06 #5
Oh sorry. I guess I mis-read your post. Oh well, maybe someone else will
want this info... :)

Steve

"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:ut****************@TK2MSFTNGP02.phx.gbl...
Hi,

This looks like code to get the version...

How do I set the value of .fileMajorPart etc ?

Thanks
"Steve Long" <St**********@NoSpam.comwrote in message
news:OO****************@TK2MSFTNGP02.phx.gbl...
>With
System.Diagnostics.FileVersionInfo.GetVersionInfo (System.Reflection.Assembly.GetExecutingAssembly.L ocation)
m_ver = .FileMajorPart & "." & .FileMinorPart & "." & .FileBuildPart &
"." & .FilePrivatePart
lblVersion.Text = m_ver
End With
"Aussie Rules" <Au*********@nospam.nospamwrote in message
news:e5****************@TK2MSFTNGP03.phx.gbl...
>>Hi,
How do I set the application productversion. I can see in the publish
section where I can set it, but no matter what I set this to, the
productversion is different

Thanks



Oct 26 '06 #6

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

Similar topics

3
by: Michael Kellogg | last post by:
At the beginning of program execution, I want to compare the executing version of the program against the network copy to see if there's been an update. In the "Properties" window of an EXE, I can...
6
by: Mike E | last post by:
How is this set in visual c++. I assumed it was in the AssemblyInfo.cpp file, but the changes are never picked up and Application::ProductVersion keeps coming back empty. Help is appreciated.
1
by: DemonIT | last post by:
Hi, I am trying to set the status bar of my form to include the product name and product version. Here is my code: Private Sub initStatusBar() Dim sSBText as String =...
9
by: Chubbly Geezer | last post by:
Hi I want to check that users have the latest version of an app by checking it's version number against that held on the server. Would anyone know how to access this via code. Thanks
3
by: GrandpaB | last post by:
I have generated the following code: lblCompany.Text = "Company Name: " & Application.CompanyName lblProduct.Text = "Product Name: " & Application.ProductName lblVersion.Text = "Version " &...
5
by: Lyners | last post by:
I have a VB.NET application that is deployed to an end user. I would like to display on screen the application version of the application so that I know the end user id using the latest version of...
3
by: UJ | last post by:
Is there an equivalent to Application.ProductVersion for Websites?
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: Joachim Hofmann | last post by:
Hallo, - Woher wird diese Eigenschaft ermittelt? - Wenn ich eine Solution mit mehreren Projekten habe, müßte es dann der Eintrag in der Datei AssemblyInfo.vb sein, der da z.B. lautet...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.