真的很重要的问题(文件已损坏) [英] Really Important Question(File Corrupted Maybe)

查看:77
本文介绍了真的很重要的问题(文件已损坏)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请大家帮帮我。求求你。

我正在使用Visual C#2010开展我的C#项目。然后突然电脑上吊得非常严重,我不得不强制关机。当时我重新打开计算机并打开我的Project文件,它显示错误,项目文件无法加载,因为根元素丢失。另一个错误显示无法找到引用的组件mycontentfolder。甚至我的一些.cs文件无法打开。现在该怎么办?这个项目对我来说非常重要。请帮助我!!

解决方案

从这里尝试解决方案...



http: //blogs.msdn.com/b/zainnab/archive/2010/06/30/autorecover-vstipenv0019.aspx [ ^ ]



http://stackoverflow.com/questions/7622901/recover-a-cs-class-file-after-crash [< a href =http://stackoverflow.com/questions/7622901/recover-a-cs-class-file-after-crashtarget =_ blanktitle =New Window> ^ ]



http: //stackoverflow.com/questions/6250390/visual-studio-lost-current-code-on-sudden-crash [ ^ ]


Ok。首先尝试从备份中恢复。

你有备份,不是吗?你不......好的。首先,把它作为一个教训。备份很重要。非常非常重要,确保你拥有它们非常值得,而且它们经常被定期完成,如果出现问题,你就不会再失去工作了。对我来说,大概一个小时......所以我每天每小时增量备份到我的NAS吞吐量。



没有备份意味着你遇到麻烦 - 但不是它是完全无法修复的。您将要做的是重新创建项目文件。

首先创建一个新的解决方案,并为每个旧解决方案添加一个新项目:所以可能有一个EXE和两个DLL。

然后右键单击解决方案资源管理器中的每个项目,并使用添加现有文件将原始C#文件添加到新项目中。这会将它们复制到新项目位置,并自动挂钩设计器文件。



重建,并注意错误和警告 - 您可能需要添加引用如果旧项目有新项目的话,那就是新项目。



当你再次使用它时:重新开始! :笑:

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!!

解决方案

Try solutions from here...

http://blogs.msdn.com/b/zainnab/archive/2010/06/30/autorecover-vstipenv0019.aspx[^]

http://stackoverflow.com/questions/7622901/recover-a-cs-class-file-after-crash[^]

http://stackoverflow.com/questions/6250390/visual-studio-lost-current-code-on-sudden-crash[^]


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:


这篇关于真的很重要的问题(文件已损坏)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆