0

If a .NET app is compiled targetting .NET 2.0, will an installation of Windows with only .NET 4.0 installed allow the app to execute without any problems?

Joe DF
  • 5,438
  • 6
  • 41
  • 63
CJ7
  • 22,579
  • 65
  • 193
  • 321
  • http://stackoverflow.com/questions/2653566/what-happens-when-net-4-0-references-a-net-2-0-assembly – rism Mar 15 '13 at 03:23

2 Answers2

2

They are supposed to be backwards compatible, but there are certain edge-cases that can cause problems. Unless you're pushing the limits of the framework, you should be okay.

Mike Perez
  • 68
  • 4
  • My app is being tested by a client on XP VMs and the error message they are reporting is consistent with no .NET being installed. Is .NET not installed on XP by default? Is it installed as part of Windows Updates? – CJ7 Mar 15 '13 at 03:15
  • No dotNet installed or 32bit vs 64bit compilation? – rism Mar 15 '13 at 03:17
  • No DotNet installed is what the error is indicating. – CJ7 Mar 15 '13 at 03:59
  • Ok have you checked the application configuration file? Pls see update in my answer. – rism Mar 15 '13 at 07:28
  • The .NET Framework is not installed on WinXp by Default. – Joe DF Mar 17 '13 at 01:46
1

I wouldn't simply ask the question here I would actually test it if the application actually means anything to anyone. This is a very simple thing to test and given that you're providing no info on the app in question any answer is going to be something like "probably, but it depends".

Update:

Are you forcing use of the (non existent) 2.0 runtime via the configuration file?

<configuration>
   <startup>
      <supportedRuntime version="v2.0.50727"/>
   </startup>
</configuration>
rism
  • 11,932
  • 16
  • 76
  • 116