Error opening C#project files

Asked

Viewed 1,534 times

0

Last night I had Visual Studio open with the source code of my application. However, a power outage occurred and the computer suddenly shut down.

Soon after turning it on again, start Visual Studio and try to open the files of this project, the following message occurs:

One or more projects in the solution were not loaded correctly. Check the Output Window for details.

And then on Janela de Saída, the following message is displayed:

C: Users Matheus Desktop Bluelinetech Bluelinetech Bluelinetech.csproj : error :

Unable to load project file. Root element nonexistent. C: Users Matheus Desktop Bluelinetech Bluelinetech Bluelinetech.csproj

I tried both to load the project files by file solution as well as by BlueLineTech.csproj, which is mentioned in the notice of Janela de Saída. However, both result in the same error message.

I believe that maybe I have corrupted something in that file, I don’t know for sure. Is there anything I can do or really lost all my source code?

I had been working for two months on this project, I would really like help with this problem.

Thank you for your attention!

  • No, you have lost only the project file not the source, go to the indicates folder and see that it is all there. Of course if there was something saved there lost

1 answer

1


This error occurs by some corrupted proj file.

Visual Studio always saves a backup of these files in a folder.

Sail to:

C:\Users\<Seu Usuário>\Documents\Visual Studio <Vs versão>\Backup Files\<seu projeto>

you should see two files like this:

Original-May-18-2018-1209PM.<seu Projeto>.csproj
Recuperado-May-18-2018-1209PM.<seu Projeto>.csproj

Copy the following file:

Original-May-18-2018-1209PM.<seu Projeto>.csproj

and rename as

<seu projeto>.csproj 

and put in your project folder that has corrupted.

Ready!

  • 1

    Excellent tip. Thank you very much, saved me!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.