Bug Report T1249866
Visible to All Users

Code Declare - Declare Local throws NullReferenceException once VS was upgraded to version 17.11.0

created 6 months ago

System.NullReferenceException : Object reference not set to an instance of an object.
at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.LocalDeclarator.GetDeclarationInsertion(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.LocalDeclarator.GetNodeReplacements(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.ElementDeclarator.Execute(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.DeclareLocalRefactoring.Execute(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.VisualBasic.CodeDeclare.DeclareRefactoring.ApplyChangeManagerAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.TargetPicker.TargetPickerRegistrator.DoRegistration(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.RegisterRefactoring(<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>)

Here's my Visual Studio information:

Microsoft Visual Studio Enterprise 2022
Version 17.11.0
VisualStudio.17.Release/17.11.0+35208.52
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Enterprise

ASP.NET and Web Tools 17.11.230.51983
ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.11.230.51983
Azure App Service Tools v3.0.0

C# Tools 4.11.0-3.24374.1+f99bb16a395e48a05520ba7af1549b20bfdeee36
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.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub Copilot 0.2.1627.58842
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.11.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core) 17.11.3.2436904+f07c7bb8e623ebcc1e1028cf11d101f866c77a79
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.11.38.0
Microsoft SQL Server Data Tools

TypeScript Tools 17.0.30715.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.11.0-3.24374.1+f99bb16a395e48a05520ba7af1549b20bfdeee36
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.11.0-beta.24317.3+c07c8ebad62f6629b36349381991a299598a8d74
Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

Comments (2)

    This is happening every time I open a new solution.

    PW PW
    Przemyslaw Wlodarczak (DevExpress) 6 months ago

      Mark,

      Thank you for your report. We will fix it.

      Answers approved by DevExpress Support

      created 4 months ago

      We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

      Important Notes:

      • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
      • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
        Comments (3)
        PW PW
        Przemyslaw Wlodarczak (DevExpress) 4 months ago

          Hi,

          Do you mind if we make this ticket public, so that we can include it in the list of fixed issues for the next release?

            That would be fine.

            Mark

            PW PW
            Przemyslaw Wlodarczak (DevExpress) 4 months ago

              Thank you!

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.