When Visual Studio 2017 loads I receive errors pointing to a null reference bug in SonarLint (Notification)

  • SonarLint Plugin for Visual Studio 2017 Version: 4.2.0.3692
  • error observed (ActivityLog.xml):
  <entry>
    <record>637</record>
    <time>2018/08/08 05:58:31.702</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>LegacySitePackage failed for package [SonarLintNotificationsPackage]Source: &apos;SonarLint&apos; Description: Object reference not set to an instance of an object.&#x000D;&#x000A;System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at SonarLint.VisualStudio.Integration.Vsix.SonarLintNotificationsPackage.Initialize()&#x000D;&#x000A;   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
    <guid>{C26B6802-DD9C-4A49-B8A5-0AD8EF04C579}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>638</record>
    <time>2018/08/08 05:58:31.708</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [SonarLintNotificationsPackage](null)</description>
    <guid>{C26B6802-DD9C-4A49-B8A5-0AD8EF04C579}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>639</record>
    <time>2018/08/08 05:58:31.713</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [SonarLintNotificationsPackage]</description>
    <guid>{C26B6802-DD9C-4A49-B8A5-0AD8EF04C579}</guid>
    <hr>80004003 - E_POINTER</hr>
    <errorinfo></errorinfo>
  </entry>
  • steps to reproduce:
    • Just install the plugin and restart Visual Studio.
  • potential workaround:
    • None yet.

Hi @Reza,

I don’t have any issue on my machine with this version of SonarLint for VS. Does the ActivityLog.xml contains more info?

Cheers,
Amaury