In the latest version of 'PHP Tools' for Visual Studio 2022, there is a critical bug that causes the 'Visual Studio' process to crash.
To reproduce the issue, simply select any file in the Test Explorer and attempt to expand its details. After this action, Visual Studio will crash with a critical exception.
Error:
2025/05/31 15:14:27.789 Error PHP.Project.OptionPages.PHPToolsOptions+AdvancedPage
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject'
to interface type 'Microsoft.Internal.VisualStudio.Shell.Interop.IVsProfileLazyImportControl'
The issue is resolved in Visual Studio 2022 (17.14.3) by rolling back 'PHP Tools' from version 1.85.17401 to 1.84.20547.