4

I'm seeing this error in the activity log when starting up VS 15.3.1. It seems to be related to PVS studio, as it goes away when I disable the extension.

I'm only using C#, so I don't have any c++ modules installed. After clicking OK to the message, I don't experience any other anomaly.

<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>

I tried disabling all other third party extensions and restarted VS with the following windows open at startup:

  • C# interactive
  • Error List
  • Task List
  • Command Window
  • Output
  • Test explorer
  • Solution Explorer
  • Team Explorer
  • Start Page

Then enabled PVS and restarted VS: I got the error message

The 'Visual C++ Project System Package' did not load correctly.

  <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>

I then deleted the component cache folder: I still got the error.

Cleaned using ClearMEFComponentCache. Restarted PVS, and now I can't reproduce.

Other Info: I have upgraded to VS 15.3.2

  • Before runing ClearMEFComponentCache I had several folders in %appdata%\Microsoft\VisualStudio, i.e 14.0, 15.0 and 15.0_aaea4580 in which ComponentCache folder resides. Now I only have the 15.0_aaea4580 folder.
  • VS in opened in admin mode.
Jonas Nyrup
  • 2,376
  • 18
  • 25
  • 1
    Thanks, we are aware of this issue and currently working on resolving it. – Sergey Vasiliev Aug 22 '17 at 11:21
  • Do I understand correctly that the issues was resolved by running ClearMEFComponentCache? If so, it is possible that you've had a somewhat broken VS installation - maybe you had Visual C++ components before, and uninstalled them later? PVS-Studio VS extension does indeed interact with Visual C++ VS components, if they are present. It seems the IDE was trying to load the non-existent C++ components, after PVS-Studio was trying to access them, because the IDE was not 'aware' of them being missing somehow. – Sergey Vasiliev Aug 25 '17 at 08:08
  • I tried to note every step I did to reproduce the bug and making one step at a time. After running ClearMEFComponentCache and only that, the problem was gone. So I _think_ that's the solution, but I haven't checked if it clears more than just the ComponentCache folder. A somewhat broken VS installation sounds right. I reinstalled the PC recently and installed VS 15.2. The day after I tried to upgrade to VS 15.3 but did have some troubles installing it. If I remember correctly I uninstalled VS and installed VS15.3. – Jonas Nyrup Aug 25 '17 at 12:25

1 Answers1

0

Unfortunately, we are currently unable to reproduce the issue. Or, to be more precise, we are unable to reproduce it the way it probably occurs in your case. We were able to cause the failure of Visual C++ IDE packages by specifying the incorrect value for the MSBUILD_EXE_PATH environment variable for the devenv.exe process, but your case is most likely different one.

Could you please elaborate more on what happens to Visual Studio when you launch it with the errors in the activity log you've provided - does the IDE crash? Do some of its components not load correctly? If there are no issues in the operation of the IDE, you can ignore the warnings in the log. If there are issues, please try deleting the 'ComponentModelCache' folder in the %UserProfile%\AppData\Local\Microsoft\VisualStudio\<Visual Studio Version> directory.

Paul Eremeeff
  • 281
  • 1
  • 4
  • I received the same error on a fresh PC with a fresh install of VS 2017. I don't notice anything not working (I'm doing C# dev, not C++) I'm assuming I can safely ignore... – Daryl Sep 29 '17 at 14:37
  • @Daryl Have you tried [ClearMEFComponentCache](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ClearMEFComponentCache) tool? – Paul Eremeeff Oct 02 '17 at 06:39