Windows 10とともに、Visual Studio 2015のサポートも2025-10-14(米国時間)に終了しました。手元のPCでは、OSのほうはWindows 11に移行済みですが、Visual Studioのほうはまだ2022に移行していませんでした。
そのため、まずはVS2015をアンインストールしようとしたんですが、コントロールパネルから「Microsoft Visual Studio Community 2015」や「TypeScript Tools for Microsoft Visual Studio 2015 1.5.4.0」「同 1.6.3.0」「同 1.7.4.0」を右クリックして「変更」や「アンインストール」を実行しようとしても、Visual Studioのスプラッシュスクリーンが数秒表示されるだけで、アンインストールできません。
「設定」→「アプリ」→「インストールされているアプリ」にて「変更」や「アンインストール」を実行した場合、UACダイアログ上の「詳細を表示」から、インストーラーのキャッシュがコピーされている場所が分かります。
"%ProgramData%\Package Cache\{<GUID>}" の配下に、"vs_community.exe" や "TypeScript_Full.exe" がコピーされています。<GUID> はおそらく最初にインストーラーを起動したときに自動生成されるもので、環境によって異なるはず。
コマンドプロンプトを管理者権限で起動し、上記ディレクトリにて /repair オプションを付けてインストーラーを起動してみましたが、やはり正常に動作しません。
以下のようにPowerShellを使って結果コードを取得してみましたが、00000000が返ってきていて、エラーコードも分かりません。
$result = Start-Process -FilePath "vs_community.exe" -ArgumentList "/repair" -PassThru -Wait Write-Host $result.ExitCode.ToString("X8")
最終手段として VisualStudioUninstaller を使って大半のコンポーネントは削除できたものの、下記ログのように何度実行しても残るコンポーネントがいくつかあり、またコントロールパネルには前述の4項目が残り続けています。
C:\xxx\TotalUninstaller>Setup.ForcedUninstall.exe
The following bundles were detected on your system:
(Name: Microsoft Visual Studio Community 2015, Version: 14.0.23107.178, BundleId: 18973f44-fc03-4f49-966e-0873a033ec95)
(Name: Visual Studio 2015 Update 3 (KB3022398), Version: 14.0.25420, BundleId: 7a68448b-9cf2-4049-bd73-5875f1aa7ba2)
WARNING: This executable is designed to cleanup/scorch all Preview/RC/RTM releases of Visual Studio 2013, Visual Studio 2015 and Visual Studio vNext.
It should be used as the last resort to clean up the user's system before resorting to reimaging the machine.
Would you like to continue? [Y/N]
y
Uninstalling: C:\ProgramData\Package Cache\{18973f44-fc03-4f49-966e-0873a033ec95}\vs_community.exe
Bundle: Microsoft Visual Studio Community 2015 has been uninstalled with exit code: 0.
Uninstalling: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe
Bundle: Visual Studio 2015 Update 3 (KB3022398) has been uninstalled with exit code: 0.
Normal Visual Studio Uninstall completed.
Searching for stale MSIs and clean up stale MSIs.
3 stale MSIs found. Uninstalling them.
Uninstalled LocalESPCui for ja-jp with exit code: 0. 2/3
Uninstalled LocalESPCui for ja-jp Dev12 with exit code: 0. 1/3
Uninstalled WCF Data Services Tools for VS 2015 JPN Language Pack with exit code: 0. 0/3
Deleting registry: SOFTWARE\Microsoft\VisualStudio\12.0
Deleting registry: SOFTWARE\Microsoft\VisualStudio\14.0
Deleting registry: SOFTWARE\Microsoft\VisualStudio\15.0
Deleting registry: SOFTWARE\Microsoft\VisualStudio\12.0_Config
Deleting registry: SOFTWARE\Microsoft\VisualStudio\14.0_Config
Deleting registry: SOFTWARE\Microsoft\VisualStudio\15.0_Config
Deleting registry: SOFTWARE\Microsoft\DevDiv\vs\Servicing\12.0
Deleting registry: SOFTWARE\Microsoft\DevDiv\vs\Servicing\14.0
Deleting registry: SOFTWARE\Microsoft\DevDiv\vs\Servicing\15.0%Temp% の配下にログファイルが出力されますが、i000: Ux Startedという行を最後に、以降は何も記録されていません。
もともとWindows 10だった頃にインストールしていて、普通に使うぶんには何の問題もなかったのですが、システム上に何らかのゴミが残っていて正常なアンインストールを拒んでいるんだと思います。この状態に陥るとVS2015の再インストールもできなくなります。しかし今更サポート切れのVS2015のインストーラーのデバッグをするなど御免こうむりたい。そもそもVS2015はWindows 11には正式対応していないので、何が起きても不思議ではない。
若干気持ち悪いものの、とりあえずどうしようもないし、VS2017以降でおなじみとなったVisual Studio Installerのほうは正常に起動・動作するので、VS2015の残骸は放置してVS2022をサクッとインストールしました。.NET (C#/F#) とATL/MFC (C++) のデスクトップ開発環境を最低限構築するためのコンポーネントを選択して、10分程度でダウンロード&インストールが完了。やはりNVMe SSDは爆速ですね。