R
Rob Meade
Hi all,
I have some code which we use to retrieve an assembly version of a
referenced assembly in our proects, this information is displayed in our
footer part of our template.
I've just started writing some Server Controls as opposed to Web User
Controls and it would seem that it is retrieving the assembly version from
the referenced assembly in the "control" rather than the web application...
Here's the code:
Private Function GetCCLVersion(ByRef cclVersion As Version) As Boolean
Dim origAssembly As [Assembly]
Dim foundCCL As Boolean
Dim references As AssemblyName()
Dim currentReference As AssemblyName
cclVersion = Nothing
Try
origAssembly = [Assembly].GetExecutingAssembly
references = origAssembly.GetReferencedAssemblies()
For Each currentReference In references
If (currentReference.Name.ToLower = "ubhtcommonclasses") Then
cclVersion = currentReference.Version
foundCCL = True
Exit For
End If
Next
Catch ex As Exception
End Try
Return (foundCCL)
End Function
Can anyone tell me how I retrieve this information from the main web
application, I've tried using "GetCallingAssembly" but it seems to make no
difference...
Any info appreciated..
Regards
Rob
I have some code which we use to retrieve an assembly version of a
referenced assembly in our proects, this information is displayed in our
footer part of our template.
I've just started writing some Server Controls as opposed to Web User
Controls and it would seem that it is retrieving the assembly version from
the referenced assembly in the "control" rather than the web application...
Here's the code:
Private Function GetCCLVersion(ByRef cclVersion As Version) As Boolean
Dim origAssembly As [Assembly]
Dim foundCCL As Boolean
Dim references As AssemblyName()
Dim currentReference As AssemblyName
cclVersion = Nothing
Try
origAssembly = [Assembly].GetExecutingAssembly
references = origAssembly.GetReferencedAssemblies()
For Each currentReference In references
If (currentReference.Name.ToLower = "ubhtcommonclasses") Then
cclVersion = currentReference.Version
foundCCL = True
Exit For
End If
Next
Catch ex As Exception
End Try
Return (foundCCL)
End Function
Can anyone tell me how I retrieve this information from the main web
application, I've tried using "GetCallingAssembly" but it seems to make no
difference...
Any info appreciated..
Regards
Rob