.NET Framework 4.0 Targeting Pack does not show in Visual Studio
Solution 1:
I had this same thing after uninstalling VS2015 community, my VS2010 projects all started blowing up with this. My issue was I was missing FrameworkList.xml from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\RedistList. I copied from another machine and the problem went away.
Solution 2:
.NET 4.5 is an in-place update to the 4.0 framework. Contrary to .NET 3.0 and 3.5 which were built on top of 2.0, .NET 4.5 replaces 4.0.
In fact if you have a client Windows machine with .NET 4.0 installed and install 4.5 it will update both the client and extended profiles to 4.5 (and in 4.5 there is no client and extended profiles anymore, comes in full).
I'd suggest you target 4.5 directly, but if you do need to target 4.0 maybe VS2010 needs to be installed too; I have it along with VS2012 and .NET 4 targetting appears in the frameworks list: