如何恢复 c# class 的工作顺序
How to get recovered c# class in working order
几天前我正在浏览 YouTube,我的电脑突然死机并出现 PAGE_FAULT_IN_NONPAGED_AREA 错误。这种情况发生过几次,我认为这只是 Windows 10 中的一个错误,它从来没有真正影响到我太多,就像计算机重新启动我打开的所有选项卡和文件时 re-opened 一样。然而,这次当我的电脑重新启动时,错误似乎已经损坏了我当时正在使用 visual studio 的 class(谢天谢地,其他 classes 没有受到影响 :D)。损坏的 class 还产生了 202 个错误,其中大部分是:
严重性代码描述项目文件行
错误 CS1056 意外字符 '
(' 在实际错误中看起来像 [],如果有帮助的话)
我去了class位置,用记事本打开,想看看发生了什么,但整个都是空白的(尽管你仍然可以对空白进行文本选择space).
我在网上查看是否有其他人遇到过这个问题,有人遇到过 this。
我尝试了所有的解决方案,但 none 给了我除了解决方案四以外的任何结果(这是下载一个名为 recurva 的程序和 运行 扫描包含 class 的目录)。恢复的文件中有这个:
"LinkFilterHashList"
{
"List_3"
{
"UpdateTime" "1440597537"
"version" "8E1298389020E47C82385F70CD2D2CBFCBF16415"
"ListHashes"
{
"127" "a10b2cb9"
"126" "9b4b0158"
"125" "d51486ac"
"124" "90d4be26"
"123" "5f0339e8"
"122" "44bad6fd"
"121" "17ea1c80"
"120" "b7c14d80"
"119" "82e02475"
"118" "45dbfd52"
"117" "5112a614"
"116" "623c6132"
"115" "f15d5b67"
"114" "450f9de3"
"113" "c72f6261"
"112" "76db13e1"
"111" "d5d74942"
"110" "4c31aea4"
"109" "39be93f6"
"108" "f7a03d6a"
"107" "67ca16d3"
"106" "450d18ff"
"105" "d3ebc87f"
"104" "bd46a91b"
"103" "0afee1a3"
"102" "ccd92718"
"101" "a0244293"
"100" "2426f23b"
"99" "defe4f66"
"98" "55bb2e0e"
"97" "1560bc34"
"96" "d4e454db"
"95" "c002249a"
"94" "3904e93e"
"93" "c8d6d91e"
"92" "716b327f"
"91" "763dc014"
"90" "cb1a4644"
"89" "b4d31bce"
"88" "9c86f47b"
"87" "f6337120"
"86" "f0fa14d1"
"85" "dd1405fb"
"84" "4be7fd6d"
"83" "f0eb2085"
"82" "d3bf95ea"
"81" "e1b9b9c9"
"80" "a052f026"
"79" "ff120db1"
"78" "f6f73860"
"77" "a6f25f79"
"76" "5fe133bf"
"75" "1e9f5241"
"74" "2352753a"
"73" "932b1389"
"72" "7d4c0b1c"
"71" "ce171620"
"70" "a248bfee"
"69" "3ed688bd"
"68" "a2001d91"
"67" "6eed69b1"
"66" "50340073"
"65" "4d164331"
"64" "83dbdf21"
"63" "41c27890"
"62" "1918e6c7"
"61" "72601636"
"60" "5d6e0537"
"59" "1e5dca25"
"58" "bf6d9a00"
"57" "7a9dca5d"
"56" "cb094fd0"
"55" "9c44b858"
"54" "4db97899"
"53" "d3ffef5a"
"52" "1084ac47"
"51" "80e2567a"
"50" "90ae19fa"
"49" "3a1e0ffe"
"48" "74c8a2e0"
"47" "d142e8a9"
"46" "75e3b51c"
"45" "cbd1da13"
"44" "2820efab"
"43" "0f280c48"
"42" "75624871"
"41" "7597abfd"
"40" "bd0fb8a6"
"39" "79a7f00a"
"38" "5a780f42"
"37" "abb58601"
"36" "c70319d1"
"35" "aa387037"
"34" "c58bd0fc"
"33" "271ab389"
"32" "382fc066"
"31" "cd9e1de8"
"30" "87d9e083"
"29" "26796404"
"28" "f466b44e"
"27" "06c7b1d7"
"26" "cfe635e0"
"25" "7bf78afd"
"24" "57a55b2a"
"23" "13284911"
"22" "c14cc073"
"21" "6323fc24"
"20" "9f533812"
"19" "7c8ead73"
"18" "f6389d4c"
"17" "24ee8dd0"
"16" "93517ede"
"15" "a716c85c"
"14" "1f316383"
"13" "bcf5833f"
"12" "cf89c5b5"
"11" "46230cf9"
"10" "35970855"
"9" "397ad2e1"
"8" "57e6e7bc"
"7" "5b1f58cb"
"6" "c2734de0"
"5" "ece2b91b"
"4" "67e1603d"
"3" "ba8e5ae7"
"2" "4d3846f1"
"1" "f6064fb3"
"0" "8f4887b3"
}
}
"List_6"
{
"UpdateTime" "1440597538"
"version" "2551A1522AEA2CF617641A9D53264DE41C06D773"
"ListHashes"
{
"85" "60872dd8"
"84" "62bf4267"
"83" "44e0f55a"
"82" "71cf1e3d"
"81" "d368c87c"
"80" "635d0396"
"79" "9eec3af5"
"78" "29f7defc"
"77" "4a99fe0b"
"
我还在 recurva 文件的 header 中看到了该文本,以及:
22 4C 69 6E
6B 46 69 6C
74 65 72 48
61 73 68 4C
69 73 74 22
0A 7B 0A 09
22 4C 69 73
74 5F 33 22
0A 09 7B 0A
09 09 22 55
70 64 61 74
65 54 69 6D
65 22 09 09
22 31 34 34
30 35 39 37
35 33 37 22
0A 09 09 22
76 65 72 73
69 6F 6E 22
09 09 22 38
45 31 32 39
38 33 38 39
30 32 30 45
34 37 43 38
32 33 38 35
46 37 30 43
44 32 44 32
43 42 46 43
42 46 31 36
34 31 35 22
0A 09 09 22
4C 69 73 74
48 61 73 68
65 73 22 0A
09 09 7B 0A
09 09 09 22
31 32 37 22
09 09 22 61
31 30 62 32
63 62 39 22
0A 09 09 09
22 31 32 36
22 09 09 22
39 62 34 62
30 31 35 38
22 0A 09 09
09 22 31 32
35 22 09 09
22 64 35 31
34 38 36 61
63 22 0A 09
09 09 22 31
32 34 22 09
09 22 39 30
64 34 62 65
32 36 22 0A
09 09 09 22
31 32 33 22
09 09 22 35
66 30 33 33
39 65 38 22
0A 09 09 09
22 31 32 32
22 09 09 22
(我知道这不是技术上的代码,而是为了便于阅读而在代码片段中)。
我假设可以将这些文本位转换回 c#,但我不确定如何。任何帮助将不胜感激。 (顺便说一句,我知道 visual studio 备份,但它似乎没有为我的任何文件创建备份)。
编辑:我会提供 recurva 的屏幕截图,但在我尝试使用 chkdsk /f 解决问题后它似乎不起作用。
正在恢复文件
由于多种原因,此类崩溃随时可能发生。 NTFS 文件系统不保证文件的可恢复性。如果可以的话,那就是运气了。
根据您在问题中提到的文件内容,无法取回 C# 代码。如您所见,第一个数据只是文本(看起来像 JSON),第二个数据完全相同,只是显示为十六进制值。
真正的解决方案
你真的应该研究像 SVN and a Windows Explorer integration like TortoiseSVN and a Visual Studio integration like VisualSVN 这样的版本控制系统。
任何其他版本控制也可以(Git、TFS、Mercury、CVS、Bazaar),只需选择一个适合您需要的即可。
这些不仅能在崩溃的情况下提供帮助,而且在您更改代码、有意保存代码但发现代码不起作用时也能提供帮助。
几天前我正在浏览 YouTube,我的电脑突然死机并出现 PAGE_FAULT_IN_NONPAGED_AREA 错误。这种情况发生过几次,我认为这只是 Windows 10 中的一个错误,它从来没有真正影响到我太多,就像计算机重新启动我打开的所有选项卡和文件时 re-opened 一样。然而,这次当我的电脑重新启动时,错误似乎已经损坏了我当时正在使用 visual studio 的 class(谢天谢地,其他 classes 没有受到影响 :D)。损坏的 class 还产生了 202 个错误,其中大部分是:
严重性代码描述项目文件行 错误 CS1056 意外字符 ' (' 在实际错误中看起来像 [],如果有帮助的话)
我去了class位置,用记事本打开,想看看发生了什么,但整个都是空白的(尽管你仍然可以对空白进行文本选择space).
我在网上查看是否有其他人遇到过这个问题,有人遇到过 this。 我尝试了所有的解决方案,但 none 给了我除了解决方案四以外的任何结果(这是下载一个名为 recurva 的程序和 运行 扫描包含 class 的目录)。恢复的文件中有这个:
"LinkFilterHashList"
{
"List_3"
{
"UpdateTime" "1440597537"
"version" "8E1298389020E47C82385F70CD2D2CBFCBF16415"
"ListHashes"
{
"127" "a10b2cb9"
"126" "9b4b0158"
"125" "d51486ac"
"124" "90d4be26"
"123" "5f0339e8"
"122" "44bad6fd"
"121" "17ea1c80"
"120" "b7c14d80"
"119" "82e02475"
"118" "45dbfd52"
"117" "5112a614"
"116" "623c6132"
"115" "f15d5b67"
"114" "450f9de3"
"113" "c72f6261"
"112" "76db13e1"
"111" "d5d74942"
"110" "4c31aea4"
"109" "39be93f6"
"108" "f7a03d6a"
"107" "67ca16d3"
"106" "450d18ff"
"105" "d3ebc87f"
"104" "bd46a91b"
"103" "0afee1a3"
"102" "ccd92718"
"101" "a0244293"
"100" "2426f23b"
"99" "defe4f66"
"98" "55bb2e0e"
"97" "1560bc34"
"96" "d4e454db"
"95" "c002249a"
"94" "3904e93e"
"93" "c8d6d91e"
"92" "716b327f"
"91" "763dc014"
"90" "cb1a4644"
"89" "b4d31bce"
"88" "9c86f47b"
"87" "f6337120"
"86" "f0fa14d1"
"85" "dd1405fb"
"84" "4be7fd6d"
"83" "f0eb2085"
"82" "d3bf95ea"
"81" "e1b9b9c9"
"80" "a052f026"
"79" "ff120db1"
"78" "f6f73860"
"77" "a6f25f79"
"76" "5fe133bf"
"75" "1e9f5241"
"74" "2352753a"
"73" "932b1389"
"72" "7d4c0b1c"
"71" "ce171620"
"70" "a248bfee"
"69" "3ed688bd"
"68" "a2001d91"
"67" "6eed69b1"
"66" "50340073"
"65" "4d164331"
"64" "83dbdf21"
"63" "41c27890"
"62" "1918e6c7"
"61" "72601636"
"60" "5d6e0537"
"59" "1e5dca25"
"58" "bf6d9a00"
"57" "7a9dca5d"
"56" "cb094fd0"
"55" "9c44b858"
"54" "4db97899"
"53" "d3ffef5a"
"52" "1084ac47"
"51" "80e2567a"
"50" "90ae19fa"
"49" "3a1e0ffe"
"48" "74c8a2e0"
"47" "d142e8a9"
"46" "75e3b51c"
"45" "cbd1da13"
"44" "2820efab"
"43" "0f280c48"
"42" "75624871"
"41" "7597abfd"
"40" "bd0fb8a6"
"39" "79a7f00a"
"38" "5a780f42"
"37" "abb58601"
"36" "c70319d1"
"35" "aa387037"
"34" "c58bd0fc"
"33" "271ab389"
"32" "382fc066"
"31" "cd9e1de8"
"30" "87d9e083"
"29" "26796404"
"28" "f466b44e"
"27" "06c7b1d7"
"26" "cfe635e0"
"25" "7bf78afd"
"24" "57a55b2a"
"23" "13284911"
"22" "c14cc073"
"21" "6323fc24"
"20" "9f533812"
"19" "7c8ead73"
"18" "f6389d4c"
"17" "24ee8dd0"
"16" "93517ede"
"15" "a716c85c"
"14" "1f316383"
"13" "bcf5833f"
"12" "cf89c5b5"
"11" "46230cf9"
"10" "35970855"
"9" "397ad2e1"
"8" "57e6e7bc"
"7" "5b1f58cb"
"6" "c2734de0"
"5" "ece2b91b"
"4" "67e1603d"
"3" "ba8e5ae7"
"2" "4d3846f1"
"1" "f6064fb3"
"0" "8f4887b3"
}
}
"List_6"
{
"UpdateTime" "1440597538"
"version" "2551A1522AEA2CF617641A9D53264DE41C06D773"
"ListHashes"
{
"85" "60872dd8"
"84" "62bf4267"
"83" "44e0f55a"
"82" "71cf1e3d"
"81" "d368c87c"
"80" "635d0396"
"79" "9eec3af5"
"78" "29f7defc"
"77" "4a99fe0b"
"
我还在 recurva 文件的 header 中看到了该文本,以及:
22 4C 69 6E
6B 46 69 6C
74 65 72 48
61 73 68 4C
69 73 74 22
0A 7B 0A 09
22 4C 69 73
74 5F 33 22
0A 09 7B 0A
09 09 22 55
70 64 61 74
65 54 69 6D
65 22 09 09
22 31 34 34
30 35 39 37
35 33 37 22
0A 09 09 22
76 65 72 73
69 6F 6E 22
09 09 22 38
45 31 32 39
38 33 38 39
30 32 30 45
34 37 43 38
32 33 38 35
46 37 30 43
44 32 44 32
43 42 46 43
42 46 31 36
34 31 35 22
0A 09 09 22
4C 69 73 74
48 61 73 68
65 73 22 0A
09 09 7B 0A
09 09 09 22
31 32 37 22
09 09 22 61
31 30 62 32
63 62 39 22
0A 09 09 09
22 31 32 36
22 09 09 22
39 62 34 62
30 31 35 38
22 0A 09 09
09 22 31 32
35 22 09 09
22 64 35 31
34 38 36 61
63 22 0A 09
09 09 22 31
32 34 22 09
09 22 39 30
64 34 62 65
32 36 22 0A
09 09 09 22
31 32 33 22
09 09 22 35
66 30 33 33
39 65 38 22
0A 09 09 09
22 31 32 32
22 09 09 22
我假设可以将这些文本位转换回 c#,但我不确定如何。任何帮助将不胜感激。 (顺便说一句,我知道 visual studio 备份,但它似乎没有为我的任何文件创建备份)。
编辑:我会提供 recurva 的屏幕截图,但在我尝试使用 chkdsk /f 解决问题后它似乎不起作用。
正在恢复文件
由于多种原因,此类崩溃随时可能发生。 NTFS 文件系统不保证文件的可恢复性。如果可以的话,那就是运气了。
根据您在问题中提到的文件内容,无法取回 C# 代码。如您所见,第一个数据只是文本(看起来像 JSON),第二个数据完全相同,只是显示为十六进制值。
真正的解决方案
你真的应该研究像 SVN and a Windows Explorer integration like TortoiseSVN and a Visual Studio integration like VisualSVN 这样的版本控制系统。
任何其他版本控制也可以(Git、TFS、Mercury、CVS、Bazaar),只需选择一个适合您需要的即可。
这些不仅能在崩溃的情况下提供帮助,而且在您更改代码、有意保存代码但发现代码不起作用时也能提供帮助。