使用ngen或其他工具从mscorlib.ni.dll中提取pdb
问题描述:
我想从mscorlib.ni.dll中获取pdb,但在所有情况下都失败。我使用了支持“createpdb”选项的pc的ngen.exe。使用ngen或其他工具从mscorlib.ni.dll中提取pdb
可以肯定的是,我运行了所有带有所有mscorlib.ni.dll版本的ngen版本。在所有情况下,我最终都会遇到错误。
有人可以帮助demistify在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))
答
我们也有这个问题,并解决是这样一个问题:How to get the PDB file for mscorlib.ni.lib (.Net Framework 3.5)
原来我们使用NGEN从Framework64而不是Framework(我们需要用于32位模块的PDB)
哪些Windows使用?我在Windows 8中测试它,它的工作原理:http://pastebin.com/jxVLVNvM – magicandre1981
在两种类型的天青虚拟机上测试 带有描述日志的一个是Winfows Server 2012 R2 Datacenter 另一个是Windows Server 2008 – Nadzzz
你安装了哪个.net版本?我用.net 4.5.2测试了它。 – magicandre1981