By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,688 Members | 1,900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,688 IT Pros & Developers. It's quick & easy.

Detecting if .NET Framework installed or not?

P: n/a
Right now, all my VB.NET programs crash on startup if the .NET Framework
isn't installed on the target PC. Is there a graceful way to detect,
notify-in-a-friendly-way, and quit of the application if the .NET Framework
is missing?

--
Jeff S.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
No. That would require you to have the ability to run some code to figure
this out - which you can't, because the absense of the framework means you
can't run any code.

"Jeff Stewart" <ja*@micronovatech.com> wrote in message
news:1099933011.Drpb9QKj+CLwpPvupKfctQ@teranews...
Right now, all my VB.NET programs crash on startup if the .NET Framework
isn't installed on the target PC. Is there a graceful way to detect,
notify-in-a-friendly-way, and quit of the application if the .NET Framework is missing?

--
Jeff S.

Nov 21 '05 #2

P: n/a
"Jeff Stewart" <ja*@micronovatech.com> schrieb:
Right now, all my VB.NET programs crash on startup if the
.NET Framework isn't installed on the target PC. Is there
a graceful way to detect, notify-in-a-friendly-way, and quit of
the application if the .NET Framework is missing?


This cannot be done using a .NET application. You may want to develop an
application in plain C++ to check if the Framework is installed and call
your .NET application only if this is the case. Alternatively you can
install the .NET Framework during your application's setup.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3

P: n/a
As per Herfried suggestion just use the Installer to detect this for you. If you are installing from
the web you can check the header of the request to see if the user has dotNet installed however.
Depends on your deployment scenario.

hth
Richard
Nov 21 '05 #4

P: n/a
Herfried K. Wagner [MVP] wrote:
"Jeff Stewart" <ja*@micronovatech.com> schrieb:
Right now, all my VB.NET programs crash on startup if the
.NET Framework isn't installed on the target PC. Is there
a graceful way to detect, notify-in-a-friendly-way, and quit of
the application if the .NET Framework is missing?

This cannot be done using a .NET application. You may want to develop
an application in plain C++ to check if the Framework is installed and
call your .NET application only if this is the case. Alternatively you
can install the .NET Framework during your application's setup.


To detect and or install dotnetfx during setup:
http://msdn.microsoft.com/vstudio/do.../bootstrapper/

Rinze
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.