Windows Forms Designer error : Value cannot be null. Parameter name: instance

Ahmad Ganteng 0 Reputation points
2023-05-18T02:41:37.96+00:00

I am developing an app using C# Windows Forms with framework DevExpress.

My IDE are Visual Studio Community 2022.

It is all okay.
But after I am updating to Version 17.6.0 the window that I develop cannot load design mode with error message "Value cannot be null. Parameter name: instance"

I have check my nuget but all is updated and no problem.
I have check the form designer file and has no clue..

vs2022 devexpress

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,886 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,073 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,874 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,451 Reputation points Microsoft Vendor
    2023-05-18T08:33:20.56+00:00

    Hi @Ahmad Ganteng ,

    Welcome to Microsoft Q&A forum.

    Please try following methods and let us know if any of them works.

    1. Close VS => remove the hidden .vs folder in your solution folder => Open VS and open your solution => right-click your project => Unload Project => right-click it again => Reload Project => check if the Designer works.
    2. Try to clean your project(remove the bin, obj folders) and rebuild it.
    3. Go to C:\Users\username\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX folder find and rename ComponentModelCache folder.
    4. Try to repair VS => from VS Installer > More > Repair.
    5. Try to reinstall extensions(Extensions > Manage Extensions) and reset VS settings(run devenv /ResetSettings in Developer Command Prompt for Visual Studio 2022 Community) if possible.

    Please also try to create a new Windows Forms project and let us know if this error also appears in a newly created project.

    Looking forward to hearing from you.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Karen Payne MVP 35,406 Reputation points
    2023-06-24T10:30:47.17+00:00

    There are some reported issues with 17.6.0 edition and your current issue may be part of this.

    What in 17.6.0 do you need? I ask because there is nothing ground-breaking in this edition.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.