Desktop .EXE looking for .NET

willisgt

Active Member
Licensed User
Hmmmm. I seem to be at a dead end. Again.

I'm trying to compile a program as a desktop (not device) executable. It actually compiles just fine, but when I try to run it I get this obtuse little error -

"To run this application, you first must install one of the following versions of the .NET framework"... (and a list of versions follows).

I have .NET 2.0 installed.

It seems as though this has come up in the forum before, but I couldn't find the thread.

:sign0163:

Gary
 

agraham

Expert
Licensed User
Longtime User
Compiled desktop applications target .Net 1.1 by default.
Yes but they should run under .NET 2.0 as they do on my machines which have .NET 2.0 ( and 3.0) installed but not .NET 1.1. Also the implication is that Dbasic.exe runs OK (it is a .NET 1.1 app) and as compiled desktop apps are also .NET 1.1 (they use a precompiled runtime that Dbasic adds to the compiled exe) then they should also run.

I am assuming that you do NOT have .NET 1.1 installed and are absolutely sure that it is .NET 2.0 that you do have installed.

I can think of no reason for this error as it normally means that the .NET Framework didn't install properly and the runtime can't be found but as Dbasic.exe runs this can't be so.

Does this happen on any compiled application or only on a particular one? If only on a particular one then post the source and I will try it for you on my machines which are .NET 1.1 free.

As Erel says try forcing .NET 2.0 operation with a config file as found here :-
http://www.b4x.com/netcf2.html
However if you don't have .NET 1.1 then this should not be necessary.

Finally if you are using a pre-Vista OS then I would try uninstalling the Framework, rebooting and reinstalling. You can't do this on Vista as .NET 3.0 installs as part of the OS and is not separately uninstallable. In this case you could try booting your Vista install disk and doing a repair on the OS.
 
Top