Use conditional compilation in visual studio to switch between dlls of target framework.
Refer below links for help:
Conditional Compilation and Framework Targets
Conditionally changing target framework version
visual studio 2010 compiler conditions based on target framework