0

I'm working on a testing solution for newly refurbish laptops, and am unable to install .net framework on the machines that the solution needs to run on. I have made sure that the program complies with .net 2.0, and it runs fine on older machines. Windows 8 comes with .net 4.0, so I thought it should be able to handle the program, but I'm prompted to download .net 3.5 on every machine.
My question is this, is there a way to circumvent the need to install the additional .net version(s) to each computer to run this program, or will I have to create a new program and use this one as "legacy"?

Thanks in advance!

  • 1
    .net 3.5 is available as windows feature in windows 8, but not enabled/installed by default. You need to [set .net 3.5 enabled](http://support.microsoft.com/kb/2785188) manually – har07 Dec 21 '13 at 05:48
  • Is there a way to automatically enable 3.5 via code, or a way to include the files/libraries on the removable media with the program, rather than havin it pull from the system? – user3120457 Dec 22 '13 at 17:26
  • If your program run from an installer, maybe [this](http://stackoverflow.com/questions/6090913/make-an-installation-program-for-c-sharp-applications-and-include-net-framework) can help, it shows how to include .net 4.0 in installer project. If you meant the program is like a portable apps and you don't wanna install anything on the client machine, then I am not sure it is possible. Found a seem to be interesting article on [portable .NET apps](http://johnhaller.com/useful-stuff/dot-net-portable-apps). – har07 Dec 23 '13 at 01:43

1 Answers1

0

Try forcing the app to run using .Net 4.0 by editing the Runtime Element in the App.Config (or exe.config):

<configuration>
  <startup>
    <supportedRuntime version="<version>"/>
  </startup>
</configuration>

MSDN Refs:

<runtime> Element

How to: Configure an App to Support .NET Framework 4 or 4.5

Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321