1. 程式人生 > >visual studio 2010 + win7 安裝失敗 解決方法

visual studio 2010 + win7 安裝失敗 解決方法

此前安裝了VS2013並且一直在用,最近收到一個客戶的部分原始碼+靜態庫(lib)需要自己編譯,由於客戶提供的靜態庫是在VS2010下編譯的,所以需要自己安裝VS2010。安裝自己下載的VS2010時出錯如下:

[07/09/18,14:34:07] VC 9.0 Runtime (x86): [2] CMsiComponent::Install() expects the setup file for VC 9.0 Runtime (x86), but the file failed verification.
[07/09/18,14:34:08] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InternalInstallManager() with HRESULT -2147467259.
[07/09/18,14:34:09] VS70pgui: [2] DepCheck indicates VC 9.0 Runtime (x86) is not installed.
[07/09/18,14:34:10] VS70pgui: [2] DepCheck indicates VC 10.0 Runtime (x86) was not attempted to be installed.
[07/09/18,14:34:10] VS70pgui: [2] DepCheck indicates VC 10.0 Runtime (x64) was not attempted to be installed.
[07/09/18,14:34:10] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2010 64 位系統必備(x64) was not attempted to be installed.
[07/09/18,14:34:10] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio Macro Tools was not attempted to be installed.
[07/09/18,14:34:11] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio Macro Tools CHS 語言包 was not attempted to be installed.
[07/09/18,14:34:11] VS70pgui: [2] DepCheck indicates TFS 物件模型(x64) was not attempted to be installed.
[07/09/18,14:34:11] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2010 Ultimate - CHS was not attempted to be installed.
[07/09/18,14:34:12] VS70pgui: [2] DepCheck indicates 用於 Visual Studio 2010 的 Crystal Reports 模板 was not attempted to be installed.
[07/09/18,14:34:12] VS70pgui: [2] DepCheck indicates Dotfuscator 軟體服務 - 社群版語言包 was not attempted to be installed.
[07/09/18,14:34:12] VS70pgui: [2] DepCheck indicates Microsoft SQL Server Compact 3.5 SP2 (x86)簡體中文 was not attempted to be installed.
[07/09/18,14:34:12] VS70pgui: [2] DepCheck indicates Microsoft SQL Server Compact 3.5 SP2 (x64)簡體中文 was not attempted to be installed.
[07/09/18,14:34:12] VS70pgui: [2] DepCheck indicates Visual Studio 2010 Tools for SQL Server Compact 3.5 SP2 簡體中文 was not attempted to be installed.
[07/09/18,14:34:13] VS70pgui: [2] DepCheck indicates Microsoft Sync Framework Runtime 1.0 版(x64) CHS was not attempted to be installed.
[07/09/18,14:34:13] VS70pgui: [2] DepCheck indicates Microsoft Sync Services for ADO.NET 2.0 版(x64) CHS was not attempted to be installed.
[07/09/18,14:34:13] VS70pgui: [2] DepCheck indicates Microsoft Sync Framework Services 1.0 版(x64) CHS was not attempted to be installed.
[07/09/18,14:34:13] VS70pgui: [2] DepCheck indicates Microsoft Sync Framework SDK 1.0 版(x64) CHS was not attempted to be installed.
[07/09/18,14:34:14] VS70pgui: [2] DepCheck indicates VC 10.0 Designtime (x64) was not attempted to be installed.
[07/09/18,14:34:14] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2010 效能收集工具(x64) was not attempted to be installed.
[07/09/18,14:34:14] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2010 IntelliTrace (x64) was not attempted to be installed.
[07/09/18,14:34:14] VS70pgui: [2] DepCheck indicates Microsoft SQL 釋出嚮導 1.4 was not attempted to be installed.
[07/09/18,14:34:14] VS70pgui: [2] DepCheck indicates Microsoft SQL Server 2008 R2 管理物件 was not attempted to be installed.
[07/09/18,14:34:15] VS70pgui: [2] DepCheck indicates Microsoft SQL Server 2008 R2 資料層應用程式框架 was not attempted to be installed.
[07/09/18,14:34:15] VS70pgui: [2] DepCheck indicates Microsoft SQL Server 2008 R2 資料層應用程式專案 was not attempted to be installed.
[07/09/18,14:34:15] VS70pgui: [2] DepCheck indicates Microsoft SQL Server 2008 R2 Transact-SQL 語言服務 was not attempted to be installed.
[07/09/18,14:34:15] VS70pgui: [2] DepCheck indicates Microsoft Visual Studio 2010 ADO.NET Entity Framework Tools was not attempted to be installed.
[07/09/18,14:34:15] VS70pgui: [2] DepCheck indicates Microsoft Help 檢視器 1.0 x64 was not attempted to be installed.
[07/09/18,14:34:16] VS70pgui: [2] DepCheck indicates Microsoft Help 檢視器 1.0 語言包 x64 was not attempted to be installed.

最後參考 https://blog.csdn.net/u013051748/article/details/46998147 所說的,下載下面的原版安裝包

最後,安裝完VS2010後,到控制面板裡面選擇解除安裝(並不是真解除安裝掉),在接下來彈出的對話方塊中輸入下面的這個序列號,點選”升級”按鈕就可以了。 
YCFHQ-9DWCY-DKV88-T2TMH-G7BHP

安裝完成後,編譯連結自己的程式碼時又出現如下錯誤:

“error: LNK1123: failure during conversion to COFF: file invalid or corrupt ”

意思是由於COFF標識轉換失敗。而在連線中完成此項工作的是cvtres.exe。這個錯誤的原因是存在多個版本的cvtres.exe。

系統目錄:C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\cvtres.exe

VS目錄:   C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe

解決辦法是將vs目錄下的cvtres.exe刪除或者改名為cvtres-old.exe即可。