简体   繁体   中英

Project Target Framework Not Installed

I am facing an issue with Visual studio 2010. I installed MVC 4 and I see that .Net Framework 4.5 is installed ( or .Net Framework 4.0 is upgraded to 4.5). I uninstalled 4.5 thinking that It will not effect .Net Framework 4.0. But I see that I dont have .Net Framework 4.0 on my machine. I reinstalled .Net Framework using Microsoft Windows plateform installer. I see that It is installed on my machine but Whenever I try to open any project which is created in 4.0, I get error:

http://img507.imageshack.us/i/errorlc.jpg/

Any suggestions for this ?

我确实曾经遇到过同样的问题,并通过重新安装VS2010解决了它。

Looks like a mess. Try to repair/reinstall Visual Studio 2010.

From my understanding, upgrading from .Net 4.0 to 4.5 is a one-way install (it actually replaces files in .Net 4.0 rather than separating 4.0 from 4.5)

If you want to go back to 4.0, you need to uninstall 4.5 (which actually uninstalls 4.x), then re-install 4.0.

Rick Strahl blogged about the nuances: http://www.west-wind.com/weblog/posts/2012/Mar/13/NET-45-is-an-inplace-replacement-for-NET-40

Strange decision on Microsoft's part to version this way. It seems the only way to differentiate between 4.0 and 4.5 today is to physically check file versions or build versions of known libraries that changed. As it is now, 4.5 apps will run under 4.0, and crash when they encounter features specific to 4.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM