星期六, 8月 23, 2014

VC++ error:MSB8020

Visual Studio報錯會顯示:
專案檔包含 ToolsVersion="12.0"。這個 Toolset 未知或遺漏。您可以為這個 Toolset 安裝適當的 .NET Framework,藉此解決這個問題。專案將被視為包含 ToolsVersion="4.0"。

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v120 to build using the v120 build tools.

這個問題是當專案升級到Visual Studio 2013,結果陰錯陽差需回到Visual Studio 2012開發時,則在建置Compile時會出現這個建置失敗的訊息。

只要重新設定一下專案屬性就可以解決此問題編譯成功。

Step1. 開啟專案屬性

Step2. 一般底下

Step3. 選擇平台工具
Visual Studio 2012 (v110) or (v110_xp)後 套用即可