Referencing 3.5 and 4.0 Assemblies from ASP.Net 2.0 Website

199 Views Asked by At

I am making a small enhancement to an old ASP.Net 2.0 Website (not web application--not sure if that matters). I have referenced a set of assemblies that target 3.5 and 4.0.

I was surprised to find that everything seems to work. I can successfully make calls to the methods within the assemblies and all is well.

What I'm concerned about is that there will be some run time problem down the road, or after deployment. Am I fine as long as the targeted .net framework versions are deployed on the servers? I'm also curious what would happen if I made a call to a method that internally used something from .Net 4.0 that didn't exist back in 2.0 (e.g. Linq).

I can't upgrade the web site to .net 4.0, as that would require regression testing of the full application (by company policy and common sense). That said, I do have the option of re-implementing the functionality I need in a .Net 2.0 project.

So--is referencing libraries built with newer .Net versions high risk, or am I out of the woods if it works on my local machine?

0

There are 0 best solutions below