【发布时间】:2018-01-30 06:00:52
【问题描述】:
我在启动 VS 15.3.1 时在活动日志中看到此错误。 它似乎与 PVS 工作室有关,因为当我禁用扩展时它就消失了。
我只使用 C#,所以我没有安装任何 c++ 模块。 单击确定消息后,我没有遇到任何其他异常。
<entry>
<record>243</record>
<time>2017/08/22 05:07:13.222</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [Visual C++ Project System Package]Source: 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine' Description: No platforms have been found on this installation.
System.Runtime.InteropServices.COMException (0x8005050A): No platforms have been found on this installation.
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.<ReadInstalledPlatformsAsync>d__260.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.<>c__DisplayClass55_0.<<Initialize>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.<>c__DisplayClass7_0.<<Invoke>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke(Func`1 method)
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.Initialize(IntPtr instResources, Object sp, Object browser, IVCBuildPackageInternal bldPkg)</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
<hr>8005050a</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>245</record>
<time>2017/08/22 05:07:15.009</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual C++ Project System Package](null)</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
<hr>8005050a</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>246</record>
<time>2017/08/22 05:07:15.010</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Visual C++ Project System Package]</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
<hr>8005050a</hr>
<errorinfo></errorinfo>
</entry>
我尝试禁用所有其他第三方扩展并重新启动 VS,并在启动时打开以下窗口:
- C# 交互
- 错误列表
- 任务列表
- 命令窗口
- 输出
- 测试浏览器
- 解决方案资源管理器
- 团队资源管理器
- 起始页
然后启用PVS并重新启动VS:我收到错误消息
“Visual C++ 项目系统包”未正确加载。
<entry>
<record>1784</record>
<time>2017/08/24 19:55:34.094</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [Visual C++ Project System Package]</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
</entry>
<entry>
<record>1785</record>
<time>2017/08/24 19:55:34.097</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [Visual C++ Project System Package]Source: 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine' Description: No platforms have been found on this installation.
System.Runtime.InteropServices.COMException (0x8005050A): No platforms have been found on this installation.
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.<ReadInstalledPlatformsAsync>d__260.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.<>c__DisplayClass55_0.<<Initialize>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.<>c__DisplayClass7_0.<<Invoke>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke(Func`1 method)
 at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.Initialize(IntPtr instResources, Object sp, Object browser, IVCBuildPackageInternal bldPkg)</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
<hr>8005050a</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1786</record>
<time>2017/08/24 19:55:34.100</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual C++ Project System Package](null)</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
<hr>8005050a</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1787</record>
<time>2017/08/24 19:55:34.102</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Visual C++ Project System Package]</description>
<guid>{F1C25864-3097-11D2-A5C5-00C04F7968B4}</guid>
<hr>8005050a</hr>
<errorinfo></errorinfo>
</entry>
然后我删除了组件缓存文件夹: 我仍然收到错误。
使用ClearMEFComponentCache 清理。 重启PVS,现在无法重现。
其他信息:我已升级到 VS 15.3.2
- 在运行 ClearMEFComponentCache 之前,我在
%appdata%\Microsoft\VisualStudio中有几个文件夹,即14.0、15.0和15.0_aaea4580,其中有ComponentCache文件夹。 现在我只有15.0_aaea4580文件夹。 - VS 在管理员模式下打开。
【问题讨论】:
-
谢谢,我们知道这个问题,目前正在努力解决它。
-
我是否正确理解问题已通过运行 ClearMEFComponentCache 得到解决?如果是这样,您的 VS 安装可能有些损坏 - 也许您之前有 Visual C++ 组件,后来又卸载了它们? PVS-Studio VS 扩展确实与 Visual C++ VS 组件交互,如果它们存在的话。在 PVS-Studio 尝试访问它们之后,IDE 似乎试图加载不存在的 C++ 组件,因为 IDE 没有“意识到”它们以某种方式丢失。
-
我试着记下我为重现错误所做的每一步,并且一次只做一个步骤。在运行 ClearMEFComponentCache 之后,问题就消失了。所以我 认为 这就是解决方案,但我没有检查它是否清除的不仅仅是 ComponentCache 文件夹。一个有点坏的 VS 安装听起来不错。我最近重新安装了 PC 并安装了 VS 15.2。在我尝试升级到 VS 15.3 但安装时遇到一些麻烦的第二天。如果我没记错的话,我卸载了 VS 并安装了 VS15.3。
标签: pvs-studio