We recently upgraded our VS 2010 and .NET 4 application to VS 2012 and .NET 4.5. We have a build script to deploy the application on the test server. We have two boxes - one
from this link.
"Open your *.csproj or *.vbproj web project file in a text editor and add the following line.
True
I added the line just before the line
v4.5
and it deploys without error."
It worked for me.