{"id":17876,"date":"2022-03-27T20:33:24","date_gmt":"2022-03-27T12:33:24","guid":{"rendered":"http:\/\/www.jdcui.com\/?p=17876"},"modified":"2026-02-20T21:57:36","modified_gmt":"2026-02-20T13:57:36","slug":"%e7%ac%94%e8%ae%b0%e7%bc%96%e7%a8%8b-visual-studio-2019-%e8%ae%be%e7%bd%ae%e5%bc%95%e7%94%a8%e6%8f%90%e7%a4%ba%e9%94%99%e8%af%af-%e5%af%b9com%e7%bb%84%e4%bb%b6%e7%9a%84%e8%b0%83%e7%94%a8","status":"publish","type":"post","link":"http:\/\/www.jdcui.com\/?p=17876","title":{"rendered":"[\u7f16\u7a0b\u7b14\u8bb0] Visual Studio 2019 \u8bbe\u7f6e\u5f15\u7528\u63d0\u793a\u9519\u8bef \u201c\u5bf9COM\u7ec4\u4ef6\u7684\u8c03\u7528\u8fd4\u56de\u4e86\u9519\u8bef HRESULT E_FAIL\u201d"},"content":{"rendered":"<p><span style=\"color: #ff00ff; background-color: #ccffcc;\"><strong>\u5b9e\u5e72\u3001\u5b9e\u8df5\u3001\u79ef\u7d2f\u3001\u601d\u8003\uff0c\u521b\u65b0\u3002<\/strong><\/span><\/p>\n<hr \/>\n<p>\u7528Visual Studio\u7f16\u7a0b\u7a0b\u5e8f.NET\u7a0b\u65f6\uff0c\u8bbe\u7f6e\u5f15\u7528\u65f6\u5f39\u51fa\u5982\u4e0b\u201c\u5bf9COM\u7ec4\u4ef6\u7684\u8c03\u7528\u8fd4\u56de\u4e86\u9519\u8bef HRESULT E_FAIL\u201d\u7684\u9519\u8bef\u7a97\u53e3\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u5f15\u7528\u7684\u5e93\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-17879 aligncenter\" src=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2022\/03\/Error1.png\" alt=\"\" width=\"357\" height=\"172\" \/><\/p>\n<p>\u540e\u767e\u5ea6\u627e\u5230\u65b9\u6cd5\uff0c\u5c31\u662f\u7ba1\u7406\u5458\u65b9\u5f0f\u8c03\u7528 Developer Command Prompt for Vs 2019\uff0c\u7136\u540e\u5c06\u8def\u5f84\u8bbe\u7f6e\u5230 PublicAssemblies\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd0\u884c<\/p>\n<p><span style=\"color: #000000; background-color: #ffff00;\"><strong>gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll<\/strong><\/span><\/p>\n<p>\u7136\u540e\u91cd\u65b0\u6253\u5361 Visual Studio 2019 \u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-17880\" src=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2022\/03\/Error2.png\" alt=\"\" width=\"1028\" height=\"550\" srcset=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2022\/03\/Error2.png 1028w, http:\/\/www.jdcui.com\/wp-content\/uploads\/2022\/03\/Error2-768x411.png 768w\" sizes=\"auto, (max-width: 1028px) 100vw, 1028px\" \/><\/p>\n<hr \/>\n<p style=\"text-align: center;\"><strong><div  class=\"thumbs-rating-container\" id=\"thumbs-rating-17876\" data-content-id=\"17876\"><button class=\"thumbs-rating-up thumbs-rating-voted\" onclick=\"thumbs_rating_vote(17876, 1);\">Vote Up +3<\/button> <button class=\"thumbs-rating-down thumbs-rating-voted\" onclick=\"thumbs_rating_vote(17876, 2);\">Vote Down -1<\/button><span class=\"thumbs-rating-already-voted\">You already voted!<\/span><\/div><\/strong><\/p>\n<ul style=\"list-style-type: square;\">\n<li style=\"text-align: left;\"><strong>\u5fae\u4fe1\u516c\u4f17\u53f7 (\u00a0<span style=\"color: #0000ff;\">Wechat\u00a0Subscription<\/span>)<\/strong><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2017\/01\/QRCODE.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3636\" src=\"http:\/\/www.jdcui.com\/wp-content\/uploads\/2017\/01\/QRCODE.jpg\" alt=\"WeChat_QRCode\" width=\"250\" height=\"255\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>\u6b22\u8fce\u5173\u6ce8\u00a0\u201c<span style=\"color: #ff00ff;\">\u7ed3\u6784\u4e4b\u65c5<\/span>\u201d\u00a0\u5fae\u4fe1\u516c\u4f17\u53f7<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u5e72\u3001\u5b9e\u8df5\u3001\u79ef\u7d2f\u3001\u601d\u8003\uff0c\u521b\u65b0\u3002 \u7528Visual Studio\u7f16\u7a0b\u7a0b\u5e8f.NET\u7a0b\u65f6\uff0c\u8bbe\u7f6e\u5f15\u7528\u65f6\u5f39\u51fa\u5982\u4e0b\u201c\u5bf9COM\u7ec4\u4ef6\u7684\u8c03\u7528\u8fd4\u56de\u4e86\u9519\u8bef HRESULT E_FAIL\u201d\u7684\u9519\u8bef\u7a97\u53e3\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u5f15\u7528\u7684\u5e93\u3002 \u540e\u767e\u5ea6\u627e\u5230\u65b9\u6cd5\uff0c\u5c31\u662f\u7ba1\u7406\u5458\u65b9\u5f0f\u8c03\u7528 Developer Command Prompt for Vs 2019\uff0c\u7136\u540e\u5c06\u8def\u5f84\u8bbe\u7f6e\u5230 PublicAssemblies\u7684\u60c5\u51b5\u4e0b\uff0c\u8fd0\u884c gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll \u7136\u540e\u91cd\u65b0\u6253\u5361 Visual Studio 2019 \u5c31\u53ef\u4ee5\u4e86\u3002 \u5fae\u4fe1\u516c\u4f17\u53f7 (\u00a0Wechat\u00a0Subscription) \u6b22\u8fce\u5173\u6ce8\u00a0\u201c\u7ed3\u6784\u4e4b\u65c5\u201d\u00a0\u5fae\u4fe1\u516c\u4f17\u53f7<\/p>\n","protected":false},"author":1,"featured_media":17879,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[3343,3344,913,896],"class_list":["post-17876","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-e_fail","tag-hresult-e_fail","tag-visual-studio","tag-896"],"aioseo_notices":[],"views":3151,"_links":{"self":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/posts\/17876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17876"}],"version-history":[{"count":0,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/posts\/17876\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=\/wp\/v2\/media\/17879"}],"wp:attachment":[{"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17876"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jdcui.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}