There are different opinions on the Internet. MS said. net4.0 in-process side-by-side compatibility is not very clear either. The following is the actual situation I tested using a simple console program.
Test environment: Windows XP XP3 is uninstalled. other versions of net, only installed. net 4.0, The called dll is previously compiled using VS2008. (If the dll is compiled together with the source code project in the solution, the dll project version is set to V3.5, and the final program can be normal)
| Console.exe |
Call Assembly dll |
Running result |
| . Net4.0 |
. Net 2.0 |
Normal |
| . Net4.0 Client Profile |
. Net 2.0 |
Unable to compile |
| . Net4.0 |
. Net 3.5 |
Normal |
| . Net 2.0 |
None |
Cannot run |
| . Net3.5 |
None |
Cannot run |
Result: 1. compiled.. Net 4.0 applications, do not need to install the previous version. you can also call the assembly of earlier versions. the Target is the Client Profile. 2. run the previous version. net program, you need to install the corresponding frameworkps: Microsoft. NET Framework 4 Client Profile (Standalone Installer) 41 Mhttp: // www.microsoft.com/downloads/en/details.aspx? FamilyID = e5ad0459-cbcc-4b4f-97b6-fb17111cf544
Microsoft. NET Framework 4 (Standalone Installer) 48 M
Http://www.microsoft.com/downloads/en/details.aspx? FamilyID = 0A391ABD-25C1-4FC0-919F-B21F31AB88B7reference: http://stackoverflow.com/questions/2642301/do-you-need-both-net-3-5-and-4-0-installed-or-just-net-4