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

How: Programatically Determine .NET Framework version

Hi,

Is there a way to obtain the version of .net that my application is
riding on (on the server). My app isn't tested nor does it run 100%
on V1.1 and for some reason my service provided has upgraded me twice.
I'd like my software to be proactive and tell me about it next time
they do it.

Is there an object that exposes the framework's version?

Thanks
Nov 17 '05 #1
3 1703
Also, check out Environment.Version:

Response.Write(Environment.Version.ToString)

--
Microsoft MVPs have a question for *you*: Are you patched against the Worm?
http://www.microsoft.com/security/se...s/ms03-026.asp

"Ken Stealth" <ke*******@yahoo.com> wrote in message
news:63**************************@posting.google.c om...
Hi,

Is there a way to obtain the version of .net that my application is
riding on (on the server). My app isn't tested nor does it run 100%
on V1.1 and for some reason my service provided has upgraded me twice.
I'd like my software to be proactive and tell me about it next time
they do it.

Is there an object that exposes the framework's version?

Thanks
Nov 17 '05 #2
Very good,

It looks like the Location indicates the ver of the FrameWork?
Is there anything else that will tell you Your Version Number is 1.1?

Thanks
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
This will tell you what assemblies and versions your app is using. Is that what you meant?

Ken

Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim thisAssembly As [Assembly] = [Assembly].GetExecutingAssembly()
Dim RefAssembly As AssemblyName
Response.Write("Referenced Assemblies: " & "<br>")
For Each RefAssembly In thisAssembly.GetReferencedAssemblies()
Response.Write(RefAssembly.FullName & "<br>")
Next
Response.Write("Code base: " & thisAssembly.CodeBase & "<br>")
Response.Write("Full name: " & thisAssembly.FullName & "<br>")
Response.Write("From Global Assembly Cache: " &
thisAssembly.GlobalAssemblyCache & "<br>")
Response.Write("Location: " & thisAssembly.Location & "<br>")
End If
End Sub
--
Microsoft MVPs have a question for *you*: Are you patched against the Worm? http://www.microsoft.com/security/se...s/ms03-026.asp

"Ken Stealth" <ke*******@yahoo.com> wrote in message
news:63**************************@posting.google.c om...
Hi,

Is there a way to obtain the version of .net that my application is
riding on (on the server). My app isn't tested nor does it run 100%
on V1.1 and for some reason my service provided has upgraded me twice.
I'd like my software to be proactive and tell me about it next time
they do it.

Is there an object that exposes the framework's version?

Thanks

Nov 17 '05 #3
That is good
Thank you
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:es****************@TK2MSFTNGP09.phx.gbl...
Also, check out Environment.Version:

Response.Write(Environment.Version.ToString)

--
Microsoft MVPs have a question for *you*: Are you patched against the Worm? http://www.microsoft.com/security/se...s/ms03-026.asp

"Ken Stealth" <ke*******@yahoo.com> wrote in message
news:63**************************@posting.google.c om...
Hi,

Is there a way to obtain the version of .net that my application is
riding on (on the server). My app isn't tested nor does it run 100%
on V1.1 and for some reason my service provided has upgraded me twice.
I'd like my software to be proactive and tell me about it next time
they do it.

Is there an object that exposes the framework's version?

Thanks

Nov 17 '05 #4

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

Similar topics

1
by: RWC | last post by:
Hi Folks, I'm looking for a way to determine if the client machine has access installed and if so, what version. The reason I need this is to determine (programatically) if the Access Runtime...
4
by: Yasutaka Ito | last post by:
Hi, Is there a way to determine which version of .NET Framework any given assembly is built with? thanks! -Yasutaka
2
by: j.b.messina | last post by:
This has not yet been published by Microsoft. It will be published within the next few weeks, mainly because I asked them to. I felt this was information badly needed, and I think this is the...
4
by: Br | last post by:
We're using an Access2000 ADP with an SQL2000 back-end. Because SQL2000 was released after Access2000 you need to be running Access2000 SP1 (2 or 3) for it to work properly. Is there an easy way...
7
by: Christina Androne | last post by:
Hello everybody! Has anybody developed an app which adds a toolbox item to the .NET IDE designer? Or knows the steps to do so? Or knows some good tutorials on this? I have a starting point, the...
1
by: Tarundeep Singh Kalra | last post by:
How to programatically determine the .NET Framework Version - -- Tarun ********************************************************************** Tarundeep Singh Kalra...
2
by: Scott | last post by:
Does anyone know of a way to get the .NET Framework version that's required by a specified assembly. I have a program I've written that creates a Windows Installer setup for any application....
8
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it...
11
by: ABC | last post by:
How to rename files with support wildcard ?
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.