Here is how I fixed my missing .Net target framework 4.0 issue in VS2010.
The Symptoms
Visual Studio 2010 stopped detecting the .Net framework 4.0. Specifically, this framework version was missing from the “Target framework” drop-down on a project’s property page. Versions 2.0, 3.0 and 3.5 were present in the list, but not 4.0. Reinstalling the framework and rebooting had no effect.
The Solution
The problem was that the file,”FrameworkList.xml
” was missing from folder “C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\RedistList
“. Copying this file from another machine solved the problem.
I am now able to target .Net 4.0 again:
Further Reading
- I found this solution at the end of this discussion.
- There is also a stackoverflow question dedicated to this issue.