{"id":156,"date":"2021-04-07T05:01:44","date_gmt":"2021-04-07T05:01:44","guid":{"rendered":"https:\/\/engy.us\/blog\/?p=156"},"modified":"2021-04-07T05:01:44","modified_gmt":"2021-04-07T05:01:44","slug":"microsoft-visualstudio-componentmodelhost-dll-issues-in-visual-studio-extensions","status":"publish","type":"post","link":"https:\/\/engy.us\/blog\/2021\/04\/07\/microsoft-visualstudio-componentmodelhost-dll-issues-in-visual-studio-extensions\/","title":{"rendered":"Microsoft.VisualStudio.ComponentModelHost.dll issues in Visual Studio extensions"},"content":{"rendered":"\n<p>I maintain a Visual Studio extension called <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=RandomEngy.UnitTestBoilerplateGenerator\">Unit Test Boilerplate Generator<\/a>. Recently I went to release a small fix for it but found that I could no longer build it since reformatting my PC. AppVeyor was also unable to build it after I upgraded it to a VS 2019 build agent.<\/p>\n\n\n\n<p>It was complaining about not being able to find Microsoft.VisualStudio.ComponentModelHost.dll v 14.0.0.0 . I had it referenced like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Reference Include=\"Microsoft.VisualStudio.ComponentModelHost, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL\" \/><\/code><\/pre>\n\n\n\n<p>Many times the answer to these old-style direct references is to change them into NuGet &lt;PackageReference> . When I did that it defaulted to 16.9.227, but that made it incompatible with VS 2017. I downgraded it to 14.0.25424 , and then it built on VS 2019 but still ran on VS 2017. Success!<\/p>\n\n\n\n<p>There is apparently magic binding redirect voodoo built into VS to point all of these references to old versions to the proper modern versions on later VS versions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I maintain a Visual Studio extension called Unit Test Boilerplate Generator. Recently I went to release a small fix for it but found that I could no longer build it since reformatting my PC. AppVeyor was also unable to build it after I upgraded it to a VS 2019 build agent. It was complaining about &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/engy.us\/blog\/2021\/04\/07\/microsoft-visualstudio-componentmodelhost-dll-issues-in-visual-studio-extensions\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Microsoft.VisualStudio.ComponentModelHost.dll issues in Visual Studio extensions&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pahBcK-2w","jetpack-related-posts":[{"id":159,"url":"https:\/\/engy.us\/blog\/2021\/05\/25\/how-to-use-individual-code-signing-certificates-to-get-rid-of-smartscreen-warnings\/","url_meta":{"origin":156,"position":0},"title":"How to Use Individual Code Signing Certificates to get rid of SmartScreen warnings","date":"May 25, 2021","format":false,"excerpt":"The problem Windows SmartScreen has for a while been trying to keep malware at bay. One of the ways of doing that is putting up a big scary warning when you try to run anything they haven't validated as safe: You have to click \"More info\" then \"Run anyway\" to\u2026","rel":"","context":"With 5 comments","img":{"alt_text":"","src":"https:\/\/i2.wp.com\/engy.us\/blog\/wp-content\/uploads\/2021\/05\/image.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":120,"url":"https:\/\/engy.us\/blog\/2020\/01\/01\/implementing-a-custom-window-title-bar-in-wpf\/","url_meta":{"origin":156,"position":1},"title":"Implementing a Custom Window Title Bar in WPF","date":"January 1, 2020","format":false,"excerpt":"There are several good reasons for wanting custom window chrome in WPF, such as fitting in additional UI or implementing a Dark theme. However the actual implementation is kind of tricky, since it is now your job to provide a bunch of features that you used to get for free.\u2026","rel":"","context":"With 12 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/posts\/156"}],"collection":[{"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/comments?post=156"}],"version-history":[{"count":1,"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/posts\/156\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/engy.us\/blog\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}