Where can I set the Version (Major, Minor and Private) in VB.NET
In VB6 it was in the project properties window. Where is it now ?
Thanks
Printable View
Where can I set the Version (Major, Minor and Private) in VB.NET
In VB6 it was in the project properties window. Where is it now ?
Thanks
Its in the AssemblyInfo.vb file:
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
<Assembly: AssemblyVersion("1.0.*")>
How do a retrieve the file version number from an exe on my PC?
Can do this in VB6, but don't know the code for .NET :(
Woof
It goes like this:
Code:Application.ProductVersion
Sorry, should have made my post clearer.
Version number from ANOTHER exe.
I have worked it out. It is:
VB Code:
Imports System.Diagnostics Public Function GetFileVersion(ByVal pstrEXE As String) As String Dim myFileVersionInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(pstrEXE) GetFileVersion = myFileVersionInfo.FileVersion End Function
Woka
:DQuote:
Originally posted by Wokawidget
Imports System.Diagnostics
Look you stupid frog...shhhhhh.
If I don't add this imports line then:
Then FileVersionInfo is unknown and thus .NET whinges about it.VB Code:
Public Function GetFileVersion(ByVal pstrEXE As String) As String Dim myFileVersionInfo As [B]FileVersionInfo[/B] = FileVersionInfo.GetVersionInfo(pstrEXE) GetFileVersion = myFileVersionInfo.FileVersion End Function
I suppose I could do:
This is in an ASP.NET web form, and not a VB.NET application. Maybe the imports for this type of .NET project are different.VB Code:
Public Function GetFileVersion(ByVal pstrEXE As String) As String Dim myFileVersionInfo As System.Diagnostics.FileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(pstrEXE) GetFileVersion = myFileVersionInfo.FileVersion End Function
*GROWL*
*EATS FROG*
*SLAP*
Woof
Hey, I didn't say anything! I just grinned at you. An innocent smile.
Why are you feeling so guilty? :p