Asp.net 4.0 has not been registered

iisiis-7visual studio 2010visual studio 2012windows-8.1

When I try to open my Visual Studio project I get the following error:

Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0.


Update:
Nevermind I fixed it:

I just repaired .Net Framework 4.0 and the issue was resolved.

Best Answer

I also fixed this issue by running

aspnet_regiis -i

using the visual studio command line tools as an administrator