No , at the moment there is no such way (this means that you heard from your colleagues quite correctly!) I think this is a known problem, and yes 4.5.1 overwrites 4.5 so make sure you have the same version installed on your development machine and server. You can get more information about your issue on this MSDN blog. MSDN
Because if you are developing Targeting.NET 4.0, then you are clearly planning to run it on a machine that does NOT have .NET 4.5!
You need to target your .Net4.0 infrastructure to get rid of your problem.
source
share