I recently started getting this error from Visual Studio:
CodeSystem.NullReferenceException : Object reference not set to an instance of an object.
at DevExpress.CodeAnalysis.CSharp.CodeDeclare.ConstantAvailabilityHelperBase.GetAvailableNodeSync(RefactoringContext context)
at DevExpress.CodeAnalysis.CSharp.CodeDeclare.ConstantAvailabilityHelperBase.GetAvailableNode(RefactoringContext context)
at async DevExpress.CodeAnalysis.CSharp.CodeDeclare.DeclareMemberRefactoring.RefactoringIsAvailable(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.GetAvailableRefactorings(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.<>c__DisplayClass12_0.<GetRefactoringFromProviderAsync>b__0(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
It doesn't seem to matter which project I am working on, but most recently I have been doing Blazor Development, not sure if that is relevant.
Microsoft Visual Studio Professional 2022
Version 17.11.1
VisualStudio.17.Release/17.11.1+35219.272
Microsoft .NET Framework
Version 4.8.09032
Installed Version: Professional
ASP.NET and Web Tools 17.11.230.51983
ASP.NET and Web Tools
C# Tools 4.11.0-3.24376.4+5e3a11e2e7f952da93f9d35bd63a2fa181c0608b
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
CodeRush for Roslyn 24.1.4.0
DevExpress CodeRush for Roslyn package.
CodeRush for Roslyn Tool Windows 24.1.4.0
DevExpress CodeRush for Roslyn Tool Windows package.
Me To. Started a week ago but I had to renew my subscription first
Hi,
I reproduced this issue. We will fix it shortly.
I have similar issue with: DeclareProvider, WidenScopeProvider, XpoFieldsProvider.
Same issue here;
I think that this problem begin after update VS2022 to 17.11.0; updated to 17.11.1 and 17.11.2 but no difference.
Carlos, you are right - the latest Visual Studio update caused all these issues to appear. We are now working on addressing this compatibility issue.