Will a .NET 3.5 or lower application incur any risk at all from installing .NET 4 on the same machine?

308 views Asked by At

I understand that .NET supports side by side execution, however I've seen cases where one machine has 2.0, and another had 2.0 sp1, and another had .NET 3.5. In those versions there were methods added to some Microsoft-produced DLL's I was using. I think it was System.Net.Mail.

This was a bad thing since I was using a method available in 2.0 SP1, and not present within plain 2.0. My app got an exception, and my manager asked me why didn't I test for that use-case. Anyone know where to find a list of methods that fit in this scenario?

Bottom Line: That experience makes me not 100% trust the side-by-side claim of .NET.

Can anyone tell me if installation of .NET 4.0 will in any way modify a config file, binaries, or otherwise influence the execution of anything of a lower framework version?

2

There are 2 answers

2
Furqan Hameedi On BEST ANSWER

In short, Installing .Net 4.0 shall not effect earlier versions in any regard, since for every framework version the config are in separate folders and binaries are in GAC that already supports side by side execution.

The problem you faced might be due to the config of your application pointing an earlier version while you are using SP1 version or (In case of web app) your server might not have the updated with SP1.

For comprehensive list of changes in each version you have to google a lot, but most of the time when you have different versions installed on your dev machine, the VS informs you of deprecated methods, for new ones it will show intellisense only if the right .Net version is there.

0
sisve On