未安装c ++时启动时出错

时间:2017-08-22 05:13:24

标签: pvs-studio

启动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: &apos;Microsoft.VisualStudio.Project.VisualC.VCProjectEngine&apos; Description: No platforms have been found on this installation.&#x000D;&#x000A;System.Runtime.InteropServices.COMException (0x8005050A): No platforms have been found on this installation.&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.&lt;ReadInstalledPlatformsAsync&gt;d__260.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.&lt;&gt;c__DisplayClass55_0.&lt;&lt;Initialize&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.&lt;&gt;c__DisplayClass7_0.&lt;&lt;Invoke&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke(Func`1 method)&#x000D;&#x000A;   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#interactive
  • 错误列表
  • 任务列表
  • 命令窗口
  • 输出
  • 测试资源管理器
  • Solution Explorer
  • 团队资源管理器
  • 起始页

然后启用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: &apos;Microsoft.VisualStudio.Project.VisualC.VCProjectEngine&apos; Description: No platforms have been found on this installation.&#x000D;&#x000A;System.Runtime.InteropServices.COMException (0x8005050A): No platforms have been found on this installation.&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.&lt;ReadInstalledPlatformsAsync&gt;d__260.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.&lt;&gt;c__DisplayClass55_0.&lt;&lt;Initialize&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.&lt;&gt;c__DisplayClass7_0.&lt;&lt;Invoke&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()&#x000D;&#x000A;   at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke(Func`1 method)&#x000D;&#x000A;   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.015.0_aaea4580ComponentCache。 现在我只有15.0_aaea4580文件夹。
  • VS在管理模式下打开。

1 个答案:

答案 0 :(得分:0)

很遗憾,我们目前无法重现此问题。或者,更确切地说,我们无法以您的情况可能发生的方式重现它。我们能够通过为devenv.exe进程指定MSBUILD_EXE_PATH环境变量的错误值来导致Visual C ++ IDE包失败,但您的情况很可能是不同的。

您是否可以详细说明当您使用您提供的活动日志中的错误启动Visual Studio时会发生什么?IDE是否会崩溃?它的某些组件是否未正确加载?如果IDE的操作没有问题,您可以忽略日志中的警告。 如果有问题,请尝试删除%UserProfile%\ AppData \ Local \ Microsoft \ VisualStudio \&lt; Visual Studio版本&gt;中的'ComponentModelCache'文件夹。 。目录