.vcxproj : error : The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.


When I open my visual studio 2022 preview recently, I frequently got this error message from the last time I upgraded my VS 2022 preview, I’ve tried all the known ways online, none of them worked.

Finally, I tried to create a new console project and solution, and then, I readded all the projects that was reported the root-level-invalid problem to the new solution, well, it’s working again, surprise.

Hope this could also save your time.

Comment

Your email address will not be published. Required fields are marked *