{"id":15361,"date":"2019-04-03T08:00:14","date_gmt":"2019-04-03T16:00:14","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/setup\/?p=15361"},"modified":"2020-03-02T05:18:51","modified_gmt":"2020-03-02T13:18:51","slug":"configure-visual-studio-across-your-organization-with-vsconfig","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/setup\/configure-visual-studio-across-your-organization-with-vsconfig\/","title":{"rendered":"Configure Visual Studio across your organization with .vsconfig"},"content":{"rendered":"<p>As application requirements grow more complex, so do our solutions. Keeping developers&#8217; environments configured across our organizations grows equally complex. Developers need to install specific workloads and components in order to build a solution. Some organizations add these requirements to their README or CONTRIBUTING documents in their repositories. Some organizations might publish these requirements in documents for new hires or even just forward emails. Configuring your development environment often becomes a day-long chore. What&#8217;s really needed is a declarative authoring model that just configures Visual Studio like you need it.<\/p>\n<p>In Visual Studio 2017 Update 15.9 we added the ability to export and import workload and component selection to a Visual Studio installation configuration file. Developers can import these files into new or existing installations. Checking these files into your source repos makes them easy to share. However, developers still need to import these to get the features they need.<\/p>\n<h2>Automatically install missing components<\/h2>\n<p>New in <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2019-code-faster-work-smarter-create-the-future\/\">Visual Studio 2019<\/a>: you can save these files as .vsconfig files in your solution root directory and when the solution (or solution directory) is opened, Visual Studio will automatically detect which components are missing and prompt you to install them.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-15365 alignnone\" src=\"https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot00.png\" alt=\"Installing missing components\" width=\"351\" height=\"345\" srcset=\"https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot00.png 351w, https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot00-300x295.png 300w\" sizes=\"(max-width: 351px) 100vw, 351px\" \/><\/p>\n<p>You can find an <a href=\"https:\/\/github.com\/Microsoft\/vswhere\/commit\/215dd2dab917b12c1756887fe8e754f8cd3913b6\">example<\/a> of this in the <a href=\"https:\/\/github.com\/Microsoft\/vswhere\">vswhere<\/a> repo on GitHub. When you click the\u00a0<strong>Install<\/strong> link, you&#8217;re prompted to install any missing components. You can click the\u00a0<strong>View full installation details<\/strong> link if you&#8217;d like to select additional components.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-15366 alignnone\" src=\"https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot01.png\" alt=\"Install missing components\" width=\"650\" height=\"420\" srcset=\"https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot01.png 650w, https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot01-300x194.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/> <img decoding=\"async\" class=\"size-full wp-image-15367 alignnone\" src=\"https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot02.png\" alt=\"Installing missing components\" width=\"650\" height=\"420\" srcset=\"https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot02.png 650w, https:\/\/devblogs.microsoft.com\/setup\/wp-content\/uploads\/sites\/13\/2019\/04\/vsconfig-screenshot02-300x194.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<h2>Exporting your configuration<\/h2>\n<p>In Visual Studio 2019, you can create a .vsconfig file right from Solution Explorer:<\/p>\n<ol>\n<li>Right-click on your solution.<\/li>\n<li>Click\u00a0<strong>Add &gt; Installation Configuration File<\/strong><\/li>\n<li>Confirm the location where you want to save the .vsconfig file (defaults to your solution root directory).<\/li>\n<li>Click\u00a0<strong>Review details<\/strong><\/li>\n<li>Select or deselect any changes you want to make and click\u00a0<strong>Export<\/strong><\/li>\n<\/ol>\n<p>To help keep the installation footprint minimal, only export those components you know you need to build, test, and possibly publish your solution. One way you can do this is to install a second instance of Visual Studio or install into a virtual machine, add those workloads and optional components you know are necessary, and build and test your solution. Add components as needed until the solution builds successfully, then export your configuration.<\/p>\n<p>For more details, see our <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/install\/import-export-installation-configurations?view=vs-2019\">documentation<\/a>.<\/p>\n<h2>Feedback<\/h2>\n<p>We love to hear your feedback! You can <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio\">report a problem<\/a> or <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/suggest-a-feature\">make suggestions<\/a> for this or any other feature in Visual Studio on our <a href=\"https:\/\/developercommunity.visualstudio.com\/\">Developer Community<\/a> site.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add a .vsconfig file to your solution root directory to configure Visual Studio consistently across your organization.<\/p>\n","protected":false},"author":389,"featured_media":15362,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[14,20,45,57,119],"class_list":["post-15361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-development","tag-installation","tag-visual-studio","tag-vs2017","tag-vs2019"],"acf":[],"blog_post_summary":"<p>Add a .vsconfig file to your solution root directory to configure Visual Studio consistently across your organization.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/15361","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=15361"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/posts\/15361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media\/15362"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/media?parent=15361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/categories?post=15361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/setup\/wp-json\/wp\/v2\/tags?post=15361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}