none
Invalid Resx file. Root element is missing error stmt

    Question

  • I had a tab appear in my designer in VB 2008 called Resrouces.resx.  I am not sure why this appeared.  It may have appeared after I tried to add an image to one of my buttons on my userform.  I remember that when I tried to add the image, a new folder appeared in my solution explore called resources.  I decided not to  add the image and deleted the resource foder in the the solution explorer.  Accordingly, when I opened up my projecta again, the Resource.resx tab appeared.  I was not sure what this was do I deleted all the code in the tab.  As a result, I am not getting two new errors:

    XML document must contain a root level element

    and 

    Invalid Resx file.  Root element is missing

    What can I do to rectify this?

    Thanks

    EM 
    Thursday, July 24, 2008 9:02 PM

Answers

  • ExcelMonkey said:

    I had a tab appear in my designer in VB 2008 called Resrouces.resx.  I am not sure why this appeared.  It may have appeared after I tried to add an image to one of my buttons on my userform.  I remember that when I tried to add the image, a new folder appeared in my solution explore called resources.  I decided not to add the image and deleted the resource foder in the the solution explorer.  Accordingly, when I opened up my projecta again, the Resource.resx tab appeared.  I was not sure what this was do I deleted all the code in the tab.  As a result, I am not getting two new errors:

    XML document must contain a root level element
    and 
    Invalid Resx file.  Root element is missing

    Hi EM,

    I can reproduce your issue.

    After you 
    delete the Resources foder in the Solution Explorer pane, the resource reference file still exists in Project Resources tab. Don't modify manually Resource.resx file, follow up the following steps, this issue will go away.

    Project menu -> Properties -> Resources -> Remove all resources (Actually they have been null reference files.)


    Best regards,
    Martin Xie

    Thursday, July 31, 2008 6:31 AM