2

I am currently developing a GUI using visual studio 2008 targeting .NetFramework 3.5 I was wondering can a computer without 3.5 but with the latest version(4.0) run the application without any problem or do I still need to install .netFramework 3.5?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Vikyboss
  • 940
  • 2
  • 11
  • 23
  • possible duplicate http://stackoverflow.com/questions/3836704/running-net-3-5-built-mixed-mode-assemblies-in-net-4-using-app-config-requires – oleksii Nov 30 '11 at 20:35

3 Answers3

4

You can add the supportedRuntime element to your app.config:

<configuration>
   <startup>
     <supportedRuntime version="v4.0" />
     <supportedRuntime version="v2.0.50727" />
   </startup>
</configuration>
heavyd
  • 17,303
  • 5
  • 56
  • 74
  • So adding this to the config will make the App work with .net 4? Because I compile targeting 3.5 and I was wondering how the config will affect the compatibility. Thanks for the help. – Vikyboss Nov 30 '11 at 20:33
  • Yes, this will allow the assembly to be loaded by the CLR v4. But make sure you test in both environments! Don't just go off of faith that is should work. – heavyd Dec 01 '11 at 01:00
1

I think you need to install 3.5 framework

Gregory Nozik
  • 3,296
  • 3
  • 32
  • 47
1

You need to install .NET 3.5. .NET 4.0 comes with a different CLR, and therefore cannot execute .NET 3.5 assemblies.

Matthias Meid
  • 12,455
  • 7
  • 45
  • 79