{"id":5868,"date":"2017-11-08T17:43:21","date_gmt":"2017-11-09T00:43:21","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/heaths\/?p=3876"},"modified":"2019-02-17T15:29:14","modified_gmt":"2019-02-17T22:29:14","slug":"set-both-x86-and-x64-registry-views-for-custom-setup-policy","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/set-both-x86-and-x64-registry-views-for-custom-setup-policy\/","title":{"rendered":"Set both x86 and x64 registry views for custom setup policy"},"content":{"rendered":"<p>I previously blogged about the <a href=\"https:\/\/devblogs.microsoft.com\/setup\/documentation-now-live-for-moving-or-disabling-the-package-cache\/\">documentation<\/a> to <a href=\"https:\/\/blogs.msdn.microsoft.com\/heaths\/2017\/04\/17\/moving-or-disabling-the-package-cache-for-visual-studio-2017\/\">move the Visual Studio 2017 package cache<\/a> by changing the <code>CachePath<\/code> policy. Originally this was done only with changes under the <code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\VisualStudio\\Setup<\/code> registry key, which is defined under the usual location for server and application policies. This registry key is shared (formerly reflected) across both 32- and 64-bit views of the registry.<\/p>\n<p>We recently discovered an issue, however, that if you&#8217;re unable to write to that location (some corporate networks prevent even administrative users from writing to that key or otherwise subsequently overwrite any changes) and instead you change <code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\Setup<\/code> 32-bit applications may not work.<\/p>\n<h3>Symptoms<\/h3>\n<p>Visual Studio 2017 should continue to work for most scenarios; however, if you open <b>Tools \/ Extensions and Updates<\/b> you might see an error dialog that reads:<\/p>\n<blockquote><p>Cannot find setup engine instance.<\/p><\/blockquote>\n<p>Additionally, you will not be able to discover workloads and components you have not yet installed in Quick Launch nor would breadcrumbs (recommended project and item templates not yet installed) appear in the New Project and New Item dialogs.<\/p>\n<h3>Workaround<\/h3>\n<p>A fix is forthcoming, but until then if you can&#8217;t change <code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\VisualStudio\\Setup<\/code> you should set both of the 32- and 64-bit registry keys on a 64-bit operating system to make sure that both 32- and 64-bit applications works.<\/p>\n<pre>reg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\Setup \/v CachePath \/t REG_SZ \/d X:\\VS\\Packages \/f \/reg:64\r\nreg add HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\Setup \/v CachePath \/t REG_SZ \/d X:\\VS\\Packages \/f \/reg:32<\/pre>\n<p>The <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/install\/set-defaults-for-enterprise-deployments#registry-keys\">documentation<\/a> has been updated and should be live shortly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Due to a bug in older versions of Visual Studio 2017, you should set the CachePath policy in both 32- and 64-bit views of the registry.<\/p>\n","protected":false},"author":389,"featured_media":3843,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[4,20,45,57],"class_list":["post-5868","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-64-bit","tag-installation","tag-visual-studio","tag-vs2017"],"acf":[],"blog_post_summary":"<p>Due to a bug in older versions of Visual Studio 2017, you should set the CachePath policy in both 32- and 64-bit views of the registry.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/5868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/users\/389"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/comments?post=5868"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/5868\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/3843"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=5868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=5868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=5868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}