简体   繁体   中英

Visual studio view (.cshtml) crashed and cannot recover

My view file(.cshtml) crashed and turned into as shown in image below. Actually, it happened right after the system was unexpectedly shut down. I tried other solutions like clearing temp files from bin. I tried to open it with notepad++ but it didn't work. Any help will be appreciated. 在此处输入图片说明

Download WinHex program and open your corrupted file with it.

  1. Go: Tools > Open Disk
  2. Navigate to your corrupted file
  3. Double click on it

If there is non-zero values , just copy and paste all this data to you new file.

I'm afraid you've lost it.

If you have a VCS in place (which you should), restore the file from there. Also, see if there are any previous versions of the file and try to fish it out from over there. Lastly, check your general-purpose backups, if you happen to have those.

If you have published your content, then in visual studio you can right click on the specific file and choose 'replace [fileName] from server'. This will download an uncorrupted version of your content from the published site.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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