locked
I cant open my windows forms project RRS feed

  • Question

  • hi,

    I have a visual studio 2012 project that wont open. Error: root element missing. What do i do?

    Thursday, August 14, 2014 1:54 PM

Answers

  • That is not so nice. 

    What I would do in your situation is make a copy of the project with windows explorer.

    Then I would create a new project and copy then (with windows explorer again) all the files of my old project in the new project folder, with the exception of the .sln and .vbproj files. (You cannot simply copy the .sln and vbproj files because it hold mainly file location data)

    Then you open the project again with Visual Studio and do in top of Solution Explorer "Show all files" True

    Now you can enable (right click on them) the files which are shadowed (execept in the .bin and .obj folder) again in your project.


    Success
    Cor


    • Edited by Cor Ligthert Friday, August 15, 2014 8:28 AM
    • Marked as answer by DevIWC Friday, August 15, 2014 8:49 AM
    Friday, August 15, 2014 8:27 AM

All replies

  • hi,

    I have a visual studio 2012 project that wont open. Error: root element missing. What do i do?

    Hi,

    To clarify this issue, did you mean that you could not run or debug that project? Will it show this error when you build that project? And it is a winform project, right?

    1. If so, to narrow down this issue, I would recommend you check all XML files of your project have correct XML structure.

    And if this error occurs in the line dealing with XML files, here is a similar thread which you could have a check.

    http://social.msdn.microsoft.com/forums/en-US/36eca160-cbac-4e13-ad14-5ac206e71c65/root-element-is-missing

    If this issue still exists, you could check whether these XML files match the encoding format.

    2. If you could not open your project with VS2012, and get "The project file could not be loaded. Root element is missing." error, then I would recommend you check the file size of vbproj.user(if it is a vb.net project, for c# check csproj.user) and the other vbproj(csproj) file. If the vbproj.user is 0 bytes, then you could delete them to test, if the .vbproj(.csproj) file is 0 bytes, then I would recommend you confirm with the provider who shared this project with you.

    Regards.

    Carl


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Carl Cai Friday, August 15, 2014 2:39 AM
    Friday, August 15, 2014 2:39 AM
  • Ok thanks. The file in question is the .vbproj project file but when i open it in notepad(i think the format is xml)there is nothing there. I cannot even load the project.
    • Edited by DevIWC Friday, August 15, 2014 8:13 AM
    Friday, August 15, 2014 8:07 AM
  • Ok thanks. The file in question is the .vbproj project file but when i open it in notepad(i think the format is xml)there is nothing there.

    Hi,

    It seems that this issue is related to that project file, since it is empty, then I am afraid that recreating another project and copying the code of this project will be a workaround, because we currently have not the other way to repair the .vbproj project file.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 15, 2014 8:18 AM
  • I don't really want to have to do that since i have already had to do it once. Is there any other way?
    Friday, August 15, 2014 8:24 AM
  • That is not so nice. 

    What I would do in your situation is make a copy of the project with windows explorer.

    Then I would create a new project and copy then (with windows explorer again) all the files of my old project in the new project folder, with the exception of the .sln and .vbproj files. (You cannot simply copy the .sln and vbproj files because it hold mainly file location data)

    Then you open the project again with Visual Studio and do in top of Solution Explorer "Show all files" True

    Now you can enable (right click on them) the files which are shadowed (execept in the .bin and .obj folder) again in your project.


    Success
    Cor


    • Edited by Cor Ligthert Friday, August 15, 2014 8:28 AM
    • Marked as answer by DevIWC Friday, August 15, 2014 8:49 AM
    Friday, August 15, 2014 8:27 AM
  • I don't understand :(
    Friday, August 15, 2014 8:30 AM
  • Cor's answer is correct, that's the way you should face this issue in order to have a new solution, since your's clearly corrupted.

    Regards

    ------------------

    Nicolás Zapata

    nicozapata.ctrl365.com

    Friday, August 15, 2014 8:15 PM