简体   繁体   English

如何在Visual Studio中恢复文件窗口表单文件

[英]how to recover files window form files in visual studio

I'd created a form in Visual Studio 2010. Somehow my computer was restarted. 我已经在Visual Studio 2010中创建了一个表单。以某种方式重新启动了我的计算机。 After restart I cannot open the form. 重新启动后,我无法打开表格。 It shows me the icon as C# file but when I double-click the file, it opens in Notepad and displays blank in Notepad. 它向我显示该图标为C#文件,但是当我双击该文件时,它在记事本中打开,在记事本中显示为空白。 It also gives me the error: No suitable editor to open the file. 它还给了我错误: No suitable editor to open the file.

Please help me recover the file. 请帮助我恢复文件。 I have spent lots of time to make this form work. 我花了很多时间使此表格生效。

Under Tools – Options – Environment, you'll find the AutoRecover page 在“工具”“选项”“环境”下,您会找到“自动恢复”页面

自动恢复页面

Note that you can opt-out of the AutoRecover feature by unchecking Save AutoRecover information. 请注意,您可以通过取消选中保存自动恢复信息来选择退出自动恢复功能。 I'm very curious if anyone has opted out here, and why. 我很好奇是否有人选择了这里,为什么。

The rest of the page is self-explanatory, but did you know where VS saves these auto-recovered files? 页面的其余部分是不言自明的,但是您知道VS将这些自动恢复的文件保存在哪里吗? They are saved in \\…\\My Documents\\Visual Studio \\Backup Files\\ . 它们保存在\\…\\ My Documents \\ Visual Studio \\ Backup Files \\中

自动恢复目录

In case you (hopefully) have never seen the AutoRecover dialog, here's what it looks like. 如果您(希望)从未见过“自动恢复”对话框,则如下所示。 It'll pop up the next time you launch VS. 下次启动VS时,它将弹出。 You have the options to either use the backup file or ignore it. 您可以选择使用备份文件,也可以忽略它。

自动恢复启动

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM