Click here to Skip to main content
15,891,693 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help me you all.I beg you.
I was working on my C# project in Visual C# 2010.Then suddenly the computer hanged very badly and I had to force shut it down.When I reopened the computer and opened my Project file,it showed the error that the project file could not be loaded because the root element was missing.Another error showed that the referred component "mycontentfolder" could not be found.Even some of my .cs files could not be opened.Now what to do?This project was very important for me.Please Help Me!!
Posted
Updated 5-Jan-15 0:04am
v2
Comments
CHill60 5-Jan-15 6:04am    
Don't use all capitals - it is considered to be shouting and therefore rude on the internet
swapnil999 5-Jan-15 6:13am    
Sorry dude.I am extremely panicked right now.

Ok. First try restoring from your backup.
You do have backups, don't you? You don't...OK. First off, take this as a lesson. Backups are important. Very, very important, and it's well worth making sure you have them, and they are done regularly enough that if there is a problem you lose no more work than you can live with. For me, that's about an hour...so I take hourly incremental backups to my NAS throughput the day.

No backup means you are in trouble - but not that it's completely unfixable. What you are going to have to do is recreate your project files.
Start by creating a new solution, and adding a new project for each each of your old ones: so one EXE and two DLL's maybe.
Then right click each project in the Solution Explorer, and use "add existing files" to add the original C# files to the new project. This will copy them to the new project location, and automatically hook up the designer files.

Rebuild, and look out for errors and warnings - you may have to add references to teh new project(s) if the old one(s) had them.

And when you get it working again: BACK IT UP! :laugh:
 
Share this answer
 
Comments
swapnil999 5-Jan-15 6:38am    
Well yes,I have a backup to restore my windows to a previous point.(30 Dec 2014) but I don't think that it will recover my document as the description days that it will restore windows to a previous day but the document files,etc will not be affected.So will that work or not?
OriginalGriff 5-Jan-15 6:45am    
No - that's a "system restore point" - it's a backup of some windows settings files, and has nothing to do with your data.
(And you never store backups on the same machine: when it fails, it takes your backups with it.)

You don't have any backups - so solve this problem and make some as a matter of urgency. I backup correspondence, Outlook, and all projects automatically to a NAS, and have hourly incrementals as well, so the "worst I can lose" is an hour's work, in theory. Saved my ass on several occasions...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900