{"id":127,"date":"2007-03-07T01:05:58","date_gmt":"2007-03-07T05:05:58","guid":{"rendered":"http:\/\/www.cchsu.com\/arthur\/2007\/03\/07\/127\/"},"modified":"2007-03-07T01:05:58","modified_gmt":"2007-03-07T05:05:58","slug":"%e8%a7%a3%e6%b1%ba-dll-hell-%e7%9a%84%e6%96%b9%e6%b3%95%e6%98%af-%e9%80%a0%e4%b8%80%e5%80%8b%e6%96%b0%e7%9a%84-hell","status":"publish","type":"post","link":"http:\/\/www.cchsu.com\/arthur\/2007\/03\/07\/127\/","title":{"rendered":"\u89e3\u6c7a DLL Hell \u7684\u65b9\u6cd5\u662f &#8230; \u9020\u4e00\u500b\u65b0\u7684 Hell &#8230;"},"content":{"rendered":"<p>\u6700\u8fd1\u958b\u59cb\u4f7f\u7528 Visual Studio 2005 SP1 (a.k.a. VS8 SP1) \u4f86\u958b\u767c\u7a0b\u5f0f\uff0cVS8 \u8207\u4e4b\u524d\u7248\u672c\u6700\u5927\u7684\u4e0d\u540c\u5728\u65bc CRT library \u6703\u5b89\u88dd\u5230 WinSxS\uff0c\u9019\u662f\u70ba\u4e86\u89e3\u6c7a DLL hell \u7684\u554f\u984c\uff0c\u81f3\u5c11 VC team \u7684 development lead <a href=\"http:\/\/blogs.msdn.com\/martynl\/archive\/2005\/10\/13\/480880.aspx\">Martyn Lovell&#8217;s \u7684 blog<\/a> \u662f\u9019\u9ebc\u5beb\u7684\u3002<\/p>\n<p>\u56e0\u6b64\uff0cVC linker \u6703\u81ea\u52d5\u7522\u751f manifest \u6a94\u6848\u4e26\u5c07\u5b83\u5305\u5165\u4f60\u7684 DLL \u6216 EXE\uff0c\u4e0d\u5e78\u7684\u662f\uff0c\u9019\u73a9\u610f\u5152\u9020\u51fa\u4e86\u4e00\u500b\u65b0\u7684 hell\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u4f8b\u5b50\uff1a<\/p>\n<p>\u6211\u6709\u4e00\u500b setup.exe \u7528\u5230\u4e86\u5169\u500b delayed-load DLL\uff0c\u4e00\u500b\u53eb comp8.dll\uff0c\u53e6\u4e00\u500b\u53eb comp8sp1.dll\u3002comp8.dll \u662f\u8cb7\u4f86\u7684\u5143\u4ef6\uff0c\u7528 VC8 (CRT version 8.0.50608.0) \u7de8\u8b6f\u6210\u7684\uff0c\u53e6\u4e00\u500b\u5143\u4ef6 comp8sp1.dll \u5247\u662f\u6211\u81ea\u5df1\u7684 DLL\uff0c\u7528 VC8 SP1 (CRT version 8.0.50727.363) \u88fd\u6210\u3002VC8 linker \u70ba setup.exe \u81ea\u52d5\u7522\u751f\u7684 manifest \u50cf\u9019\u500b\u6a23\u5b50<\/p>\n<p>&lt;dependency&gt;<br \/>\n&lt;dependentAssembly&gt;<br \/>\n&lt;assemblyIdentity type=&#8217;win32&#8242; name=&#8217;Microsoft.VC80.CRT&#8217; version=&#8217;8.0.50727.762&#8242; processorArchitecture=&#8217;x86&#8242; publicKeyToken=&#8217;1fc8b3b9a1e18e3b&#8217; \/&gt;<br \/>\n&lt;\/dependentAssembly&gt;<br \/>\n&lt;\/dependency&gt;<br \/>\n&lt;dependency&gt;<br \/>\n&lt;dependentAssembly&gt;<br \/>\n&lt;assemblyIdentity type=&#8217;win32&#8242; name=&#8217;Microsoft.VC80.CRT&#8217; version=&#8217;8.0.50608.0&#8242; processorArchitecture=&#8217;x86&#8242; publicKeyToken=&#8217;1fc8b3b9a1e18e3b&#8217; \/&gt;<br \/>\n&lt;\/dependentAssembly&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<p>\u9019\u500b\u932f\u8aa4\u7684 manifest \u5c31\u662f\u60e1\u540d\u662d\u5f70\u7684 &#8220;incorrect application configuration&#8221; \u554f\u984c (\u4e0d\u592a\u6e05\u695a\u4e2d\u6587 Windows \u4e0a\u600e\u9ebc\u7ffb\u7684)\u3002\u5982\u679c\u4f60\u5728\u4e00\u822c\u7684 XP SP2 \u6a5f\u5668\u4e0a\u57f7\u884c\u9019\u500b setup.exe \u7684\u8a71\uff0c\u591a\u534a\u6703\u76f4\u63a5\u639b\u6389\uff0c\u56e0\u70ba\u5927\u90e8\u4efd\u7684\u6a5f\u5668\u90fd\u6c92\u6709\u5b89\u88dd VC8 SP1 \u7684 runtime redist\u3002\u554f\u984c\u662f\u9019\u500b setup.exe \u672c\u4f86\u5c31\u662f\u8a2d\u8a08\u7528\u4f86\u5b89\u88dd\u9019\u4e9b runtime \u7684\u554a\uff01<\/p>\n<p>\u5982\u679c\u4f60\u4e5f\u9047\u5230\u76f8\u540c\u7684 manifest hell\uff0c<a href=\"http:\/\/blogs.msdn.com\/junfeng\/archive\/2006\/04\/14\/576314.aspx\">\u9019\u500b\u9023\u7d50<\/a>\u6709\u6b63\u78ba\u7684\u9664\u932f\u65b9\u6cd5\u3002\u82e5\u60f3\u6df1\u5165\u4e86\u89e3 side-by-side \u9019\u73a9\u610f\uff0cCodeProject \u7684<a href=\"http:\/\/www.codeproject.com\/cpp\/vcredists_x86.asp\">\u9019\u7bc7\u597d\u6587\u7ae0<\/a>\u6709\u8a73\u7d30\u7684\u89e3\u91cb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u958b\u59cb\u4f7f\u7528 Visual Studio 2005 SP1 (a.k.a. VS8 SP1) \u4f86\u958b\u767c\u7a0b\u5f0f\uff0cVS8 \u8207\u4e4b\u524d\u7248\u672c\u6700\u5927\u7684\u4e0d\u540c\u5728\u65bc CRT library \u6703\u5b89\u88dd\u5230 WinSxS\uff0c\u9019\u662f\u70ba\u4e86\u89e3\u6c7a DLL hell \u7684\u554f\u984c\uff0c\u81f3\u5c11 VC team \u7684 development lead Martyn Lovell&#8217;s \u7684 blog \u662f\u9019\u9ebc\u5beb\u7684\u3002 \u56e0\u6b64\uff0cVC linker \u6703\u81ea\u52d5\u7522\u751f manifest \u6a94\u6848\u4e26\u5c07\u5b83\u5305\u5165\u4f60\u7684 DLL \u6216 EXE\uff0c\u4e0d\u5e78\u7684\u662f\uff0c\u9019\u73a9\u610f\u5152\u9020\u51fa\u4e86\u4e00\u500b\u65b0\u7684 hell\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u4f8b\u5b50\uff1a \u6211\u6709\u4e00\u500b setup.exe \u7528\u5230\u4e86\u5169\u500b delayed-load DLL\uff0c\u4e00\u500b\u53eb comp8.dll\uff0c\u53e6\u4e00\u500b\u53eb comp8sp1.dll\u3002comp8.dll \u662f\u8cb7\u4f86\u7684\u5143\u4ef6\uff0c\u7528 VC8 (CRT version 8.0.50608.0) \u7de8\u8b6f\u6210\u7684\uff0c\u53e6\u4e00\u500b\u5143\u4ef6 comp8sp1.dll \u5247\u662f\u6211\u81ea\u5df1\u7684 DLL\uff0c\u7528 VC8 SP1 (CRT [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,6,10],"tags":[],"_links":{"self":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/127"}],"collection":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":0,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cchsu.com\/arthur\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}