Detecting if .NET Framework installed or not?

  • Thread starter Thread starter Jeff Stewart
  • Start date Start date
J

Jeff Stewart

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?
 
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 said:
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top