Many thanks for the comments and feedback. A working (hacky) solution was to do the following:
- Create a new directory on windows 8,
C:\Program Files\Reference Assemblies\Microsoft\Framework\v4.0
. - Go to a windows 7 machine, which does not have .net4.5 installed, and copy the contents of the folder
C:\Windows\Microsoft.NET\Framework\v4.0.30319
- Paste the files from step 2 into the folder created in step 1.
I was then able to correctly reference the .net4.0 assemblies in Windows 8 using the following:
/targetplatform:"v4,C:\Program Files\Reference Assemblies\Microsoft\Framework\v4.0"
Tested as working ok.