我正在尝试从mscorlib.ni.dll获取pdb,但在所有情况下它都会失败。我使用了支持“createpdb”选项的电脑中的ngen.exe。
可以肯定的是,我使用所有mscorlib.ni.dll版本运行了所有ngen版本。在所有情况下,我最终都会遇到错误。
有人可以帮助解决dll文件上pdb创建的问题。
D:\Windows\Microsoft.NET\Framework>D:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a5669e937ab8f4e7928ddb37cc469ae1\mscorlib.ni.dll" c:\symbo
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Can not find native image 'D:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a5669e937ab8f4e7928ddb37cc469ae1\mscorlib.ni.dll'. Error=3
D:\Windows\Microsoft.NET\Framework>cd v4.0.30319
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\5bd3374f05d46ba0563f44d032209f08\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\5bd3374f05d46ba0563f44d032209f08\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v2.0.50727_64\mscorlib\6227ee011c9930128c5ad76841ecf2ee\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v2.0.50727_64\mscorlib\6227ee011c9930128c5ad76841ecf2ee\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\c90ef9a73ea0044641d31b19023aad61\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\c90ef9a73ea0044641d31b19023aad61\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a20cafac04a2e9b3bcb5ec4d674775e5\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a20cafac04a2e9b3bcb5ec4d674775e5\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\5bd3374f05d46ba0563f44d032209f08\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\5bd3374f05d46ba0563f44d032209f08\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v2.0.50727_64\mscorlib\6227ee011c9930128c5ad76841ecf2ee\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v2.0.50727_64\mscorlib\6227ee011c9930128c5ad76841ecf2ee\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\c90ef9a73ea0044641d31b19023aad61\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\c90ef9a73ea0044641d31b19023aad61\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
D:\Windows\Microsoft.NET\Framework\v4.0.30319>D:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe createpdb "D:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a20cafac04a2e9b3bcb5ec4d674775e5\mscorlib.ni.dll" "c:\symbols"
Microsoft (R) CLR Native Image Generator - Version 4.0.30319.33440
Copyright (c) Microsoft Corporation. All rights reserved.
Invalid header found in native image 'D:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\a20cafac04a2e9b3bcb5ec4d674775e5\mscorlib.ni.dll'.
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
答案 0 :(得分:0)
我们也有这个问题,解决方法如下:How to get the PDB file for mscorlib.ni.lib (.Net Framework 3.5)
原来我们使用了Framework64中的ngen而不是Framework(我们需要PDB用于32位模块)