0

.csproj file in Visual studio crashed when I open it in VS in solution explorer shows to me that: load failed the project requires user input reload the project for more information

I reload the project it doesn't work and I tried to open the .csproj in Notepad ++ it shows me NULL NULL

enter image description here

Jiale Xue - MSFT
  • 3,560
  • 1
  • 6
  • 21
Samer Kasseb
  • 89
  • 1
  • 5
  • Sorry to have bad news but that looks like the project file now only contains 18000 `0x00` characters. If you haven’t used source control or have no backup then you have no option to recreate the project. Always use source control! You can [run git locally without having to have a remote server](https://stackoverflow.com/questions/32406720/how-can-i-use-git-locally) but then if your hard disk dies you still lose it - having a remote is better and private repositories can be hosted for free by eg GitHub. – stuartd May 31 '23 at 04:22
  • As long as all your code files are still there, recreating the project will still be a pain, but should mostly just be creating a new project and adding all the files to it. – stuartd May 31 '23 at 04:37
  • how can I Re-Create the project – Samer Kasseb May 31 '23 at 05:24
  • **Start using source control**. `git init` is enough to get going with. This means you can rollback if the process goes wrong. Create a new .csproj to replace the broken one, in the same location. Add in the existing files, then add project references. If you have any embedded resources, add those in or recreate them. Keep fixing until it compiles and runs! – stuartd May 31 '23 at 05:52

0 Answers0