How to fix “Root element is missing.” when doing a Visual Studio (VS) Build?

前端 未结 30 2521
北荒
北荒 2020-12-01 09:13

How to fix \"Root element is missing.\" when doing a Visual Studio (VS) Build?

Any idea what file I should look at in my solution?

Actually, I am getting thi

30条回答
  •  忘掉有多难
    2020-12-01 09:20

    This error is caused by corrupted proj file.

    Visual Studio always has backup project file at specific folder.

    Please browse to:

    C:\Users\\Documents\Visual Studio \Backup Files\
    

    You should see 2 files like this:

    Original-May-18-2018-1209PM..csproj
    Recovered-May-18-2018-1209PM..csproj
    

    You only need copy file:

    Original-May-18-2018-1209PM..csproj
    

    And re-name as

    .csproj 
    

    and override at root project folder.

    Problem is solved!

提交回复
热议问题