Why isn't an exception thrown when the right .NET framework version is not present?

Posted by Nate Heinrich on Stack Overflow See other posts from Stack Overflow or by Nate Heinrich
Published on 2010-04-27T21:20:07Z Indexed on 2010/04/27 21:23 UTC
Read the original article Hit count: 302

Filed under:
|
|

We have a .NET application which targets .NET 3.5. Our clients run it from a shared drive (very infrequently) in order to have a central config file location.

We have noticed that if a workstation accesses the shared drive and runs the program, but does not have .NET 3.5 installed, nothing happens, no error, no exception, no log entry, it just doesn't launch.

  • Why is there no error message shown in windows by the CLR?

  • Is there something I can put at the beginning of the code that would ensure that a proper error message is displayed?

It is not an option to run an installer that would check for prereqs, as we are only installing it in one central location.

Thanks.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about version