locked
Object reference not set to an instance of an object in Windows designer RRS feed

  • Question

  • Hi,

    Whenever I make changes to the designer , lets say for instance , The Title property , or the Icon property , and when i try to save the file I get the following error :

    "Code Generation for property "LocaleIndependentIdentifier' failed. Error was : 'Property accessor 'LocaleIndependentIdentifier' on object "XXXXXX" threw the following exception: 'Object reference not set to an instance of an object.' ' ".

    I really don't know what I'm missing here and I'm not able to proceed any further.

    P.S. When I make changes to the designer.cs file for the title property in notepad++ and then reopen Visual Studio, it seems to accept my change . But I'm unable to to this to set a new icon to the window. 

    I've also tried closing and reopening Visual Studio , it doesn't seem to work.

    Any help would be highly appreciated.

    • Moved by Stanly Fan Thursday, May 24, 2018 2:03 AM
    Friday, May 18, 2018 4:50 AM

All replies

  • Hi,

    Whenever I make changes to the designer , lets say for instance , The Title property , or the Icon property , and when i try to save the file I get the following error :

    "Code Generation for property "LocaleIndependentIdentifier' failed. Error was : 'Property accessor 'LocaleIndependentIdentifier' on object "XXXXXX" threw the following exception: 'Object reference not set to an instance of an object.' ' ".

    Hi Nikhil,

    What the type of your project is?   

    How did you change the designer? 

    Please provide more details about how did you do your operation.

    Regards,

    Frankie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, May 18, 2018 8:01 AM
  • Hi Frankie,

    This is a Winforms project.

    This issue occurs when I change any property of a UI element of a window.

    Friday, June 29, 2018 8:32 AM