SonarLint Extension when Enabled Visual Studio 2019 Crash!

I have the last version of Sonalint (4.34.0.31639) and the last Visual Studio 2019 Version: 16.9.4
Is there any solution.
In windows Event viewer i have these ERROR details:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info:

System.Runtime.InteropServices.COMException
   at EnvDTE.Configuration.get_Properties()
   at SonarLint.VisualStudio.Integration.VsShellUtils+<>c__DisplayClass6_0.<GetProjectProperties>b__0(EnvDTE.Configuration)
   at System.Linq.Enumerable+WhereSelectArrayIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at SonarLint.VisualStudio.Integration.VsShellUtils.GetProjectProperties(EnvDTE.Project, System.String)
   at SonarLint.VisualStudio.Integration.SolutionRuleSetsInformationProvider.GetProjectRuleSetsDeclarationsIterator(EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.SolutionRuleSetsInformationProvider.GetProjectRuleSetsDeclarations(EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.Binding.RuleSetReferenceChecker.IsReferencedByAllDeclarations(EnvDTE.Project, System.String)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder.IsFullyBoundProject(SonarLint.VisualStudio.Core.Binding.BindingConfiguration, EnvDTE.Project, SonarLint.VisualStudio.Core.Language)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder+<>c__DisplayClass10_0.<IsBindingRequired>b__1(SonarLint.VisualStudio.Core.Language)
   at System.Linq.Enumerable.Any[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,Boolean>)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder.IsBindingRequired(SonarLint.VisualStudio.Core.Binding.BindingConfiguration, EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder+<>c__DisplayClass5_0.<GetUnboundProjects>b__0(EnvDTE.Project)
   at System.Linq.Enumerable+<>c__DisplayClass6_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<CombinePredicates>b__0(System.__Canon)
   at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Buffer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToArray[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.GetUnboundProjects(SonarLint.VisualStudio.Core.Binding.BindingConfiguration)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.GetUnboundProjects()
   at SonarLint.VisualStudio.Integration.ErrorListInfoBarController.ProcessSolutionBindingCore()
   at SonarLint.VisualStudio.Integration.ErrorListInfoBarController.ProcessSolutionBinding()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Hello @Chikh,

Thank you very much for reporting this to us.

  • Can you give a bit more context what were you doing when the exception happened?
  • Did you open a solution that was already bound to SonarCloud/SonarQube, or did you try to bind for the first time?
  • Does it happen when you open a solution that is not connected to SonarCloud/SonarQube?
  • Is this the first time that you installed SonarLint, or did you upgrade to a new version?

When i install Sonalint2019 (last update) on VS2019 (last update) and open the solution than VS2019 Crash and close, here is the windows event viewer error for the crash:

Nom du journal :Application
Source :       .NET Runtime
Date :         6/21/2021 7:58:08 AM
ID de l’événement :1026
Catégorie de la tâche :Aucun
Niveau :       Erreur
Mots clés :    Classique
Utilisateur :  N/A
Ordinateur :   xxxxx
Description :
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
   at EnvDTE.Configuration.get_Properties()
   at SonarLint.VisualStudio.Integration.VsShellUtils+<>c__DisplayClass6_0.<GetProjectProperties>b__0(EnvDTE.Configuration)
   at System.Linq.Enumerable+WhereSelectArrayIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at SonarLint.VisualStudio.Integration.VsShellUtils.GetProjectProperties(EnvDTE.Project, System.String)
   at SonarLint.VisualStudio.Integration.SolutionRuleSetsInformationProvider.GetProjectRuleSetsDeclarationsIterator(EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.SolutionRuleSetsInformationProvider.GetProjectRuleSetsDeclarations(EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.Binding.RuleSetReferenceChecker.IsReferencedByAllDeclarations(EnvDTE.Project, System.String)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder.IsFullyBoundProject(SonarLint.VisualStudio.Core.Binding.BindingConfiguration, EnvDTE.Project, SonarLint.VisualStudio.Core.Language)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder+<>c__DisplayClass10_0.<IsBindingRequired>b__1(SonarLint.VisualStudio.Core.Language)
   at System.Linq.Enumerable.Any[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,Boolean>)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder.IsBindingRequired(SonarLint.VisualStudio.Core.Binding.BindingConfiguration, EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder+<>c__DisplayClass5_0.<GetUnboundProjects>b__0(EnvDTE.Project)
   at System.Linq.Enumerable+<>c__DisplayClass6_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<CombinePredicates>b__0(System.__Canon)
   at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Buffer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToArray[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.GetUnboundProjects(SonarLint.VisualStudio.Core.Binding.BindingConfiguration)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.GetUnboundProjects()
   at SonarLint.VisualStudio.Integration.ErrorListInfoBarController.ProcessSolutionBindingCore()
   at SonarLint.VisualStudio.Integration.ErrorListInfoBarController.ProcessSolutionBinding()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)


XML de l’événement :
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2021-06-21T11:58:08.512637800Z" />
    <EventRecordID>86263</EventRecordID>
    <Channel>Application</Channel>
    <Computer>xxxxxxxxxxxx</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
   at EnvDTE.Configuration.get_Properties()
   at SonarLint.VisualStudio.Integration.VsShellUtils+&lt;&gt;c__DisplayClass6_0.&lt;GetProjectProperties&gt;b__0(EnvDTE.Configuration)
   at System.Linq.Enumerable+WhereSelectArrayIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1&lt;System.__Canon&gt;)
   at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1&lt;System.__Canon&gt;)
   at SonarLint.VisualStudio.Integration.VsShellUtils.GetProjectProperties(EnvDTE.Project, System.String)
   at SonarLint.VisualStudio.Integration.SolutionRuleSetsInformationProvider.GetProjectRuleSetsDeclarationsIterator(EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.SolutionRuleSetsInformationProvider.GetProjectRuleSetsDeclarations(EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.Binding.RuleSetReferenceChecker.IsReferencedByAllDeclarations(EnvDTE.Project, System.String)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder.IsFullyBoundProject(SonarLint.VisualStudio.Core.Binding.BindingConfiguration, EnvDTE.Project, SonarLint.VisualStudio.Core.Language)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder+&lt;&gt;c__DisplayClass10_0.&lt;IsBindingRequired&gt;b__1(SonarLint.VisualStudio.Core.Language)
   at System.Linq.Enumerable.Any[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1&lt;System.__Canon&gt;, System.Func`2&lt;System.__Canon,Boolean&gt;)
   at SonarLint.VisualStudio.Integration.Binding.CSharpVBProjectBinder.IsBindingRequired(SonarLint.VisualStudio.Core.Binding.BindingConfiguration, EnvDTE.Project)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder+&lt;&gt;c__DisplayClass5_0.&lt;GetUnboundProjects&gt;b__0(EnvDTE.Project)
   at System.Linq.Enumerable+&lt;&gt;c__DisplayClass6_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].&lt;CombinePredicates&gt;b__0(System.__Canon)
   at System.Linq.Enumerable+WhereEnumerableIterator`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Buffer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1&lt;System.__Canon&gt;)
   at System.Linq.Enumerable.ToArray[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1&lt;System.__Canon&gt;)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.GetUnboundProjects(SonarLint.VisualStudio.Core.Binding.BindingConfiguration)
   at SonarLint.VisualStudio.Integration.UnboundProjectFinder.GetUnboundProjects()
   at SonarLint.VisualStudio.Integration.ErrorListInfoBarController.ProcessSolutionBindingCore()
   at SonarLint.VisualStudio.Integration.ErrorListInfoBarController.ProcessSolutionBinding()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

</Data>
  </EventData>
</Event>

Here are response to your questions :
1- When i install and activate Sonalint2019 and open a solution from VS2019 (last update)
2- Yes, the solution is bounded to SonarQube.
3- I upgrated Sonalint to the last version

Here are response to your questions :
1- When i install and activate Sonalint2019 and open a solution from VS2019 (last update)
2- Yes, the solution is bounded to SonarQube.
3- I upgrated Sonalint to the last version

Any help on this please ?

Hello @Chikh,

Does this problem still occur if you create a simple class library project and bind it to your SonarQube?

It’s occur when i open a solution with many projects VB/C# (more than 140 projects in same solution)

@Chikh that doesn’t answer Rita’s question. Does the problem still occur if you create a solution that contains a simple class library and bind it to your SonarQube server?

If you can’t bind a brand-new project then that suggests that the problem could be related to your machine setup/SonarLint installation/VS installation.

If you can bind successfully to a new project then the problem could be related to the specific solution - either the number of projects, or an issue with one of the specific projects in it.

The problem not occur when i open a simple solution with small number of projects. it’s just when i open solution with important number of projects

The problem not occur when i open a simple solution with small number of projects. it’s just when i open solution with important number of projects

Some further questions:

  1. Have you been working with the bound solution without problems for some time, or have you just set up the binding?

  2. If you’ve been working with the solution for some time, have you added any projects to it recently?

1- Yes, before works in begining and i dont know after is crashe when i Enable SonarLint in VS.2019
2- No not add any new projects.

@Chikh FYI the next release of SLVS (due early next week) will fix the crash. It will also contain additional logging to help identity which project is being processed when the failure occurs.

1 Like