Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


vs-2017 (5) Versions 1.1.0

Installs/Configures Visual Studio 2017

cookbook 'vs-2017', '= 1.1.0', :supermarket
cookbook 'vs-2017', '= 1.1.0'
knife supermarket install vs-2017
knife supermarket download vs-2017
Quality 83%

Visual Studio 2017 cookbook

Build Status
Cookbook version

This cookbook can be used to install Visual Studio 2017 and supports the editions Community, Professional and Enterprise. The installation is done by downloading and using the Microsoft Web-Installer of the appropriate version.

The workloads to be installed can be specified, or all workloads can be installed.

Currently supported versions:

  • 15.9
  • 15.8
  • 15.7
  • 15.6

Simple usage: using the vs-2017::default recipe

For simple usage, you can specify the version, the edition and the workloads to be installed via attributes.

The default attributes are:

default['vs2017']['version'] = '15.9'
default['vs2017']['edition'] = 'community'
default['vs2017']['all_workloads'] = true
default['vs2017']['workloads'] = []

Then, include the vs-2017::default recipe.

  • the version can be one of the above defined supported versions.
  • The edition can be community, professional or enterprise (case sensitive)
  • By default, all workloads are installed. To finetune the workloads, set the all_workloads attribute to false and specify the workloads as List. More information about workloads can be found here.
  • This will install vs2017, but only if no other version of this edition is already installed.

Usage with wrapper cookbooks and the vc_2017 resource block

More control over the vs installation can be achieved by using the vs_2017 resource block. All parameters are optional. If no parameters are given, Visual Studio community will be installed in the newest supported version without any workloads.

Example of an installation:

vs_2017 'Professional' do
  version '15.9' # can be any of the above mentioned versions
  action :install 
  edition 'professional' # can be 'community', 'professional' or 'enterprise' (case sensitive)
  source 'https://.../vs_professional.exe' # Optional. Usually, the source is automatically used from Microsoft if this variable is not given. You can specify the source of the installer. The installer must match the version, otherwise this cookbook might behave strangely. 
  workloads [
  ] # installs multiple workloads and/or components. See for possible workloads
  all_workloads false # set this to false if you specify dedicated workloads
  include_recommended true # defauls to true. If true, the installer will automatically install all recommended packages for the choosen workloads
  include_optional true # Defaults to false. If true, the installer will automatically install all optional packages for the choosen workloads
  product_key 'AAAAA-BBBBB-CCCCC-DDDDDD-EEEEEE' # you can pass a product key during installation. 

You can upgrade an installed Visual Studio 2017 to a newer minor version.
For example, if you have Version 15.6 installed and want to update to version 15.8, the following resource block can be used:

vs_2017 "Update Enterprise to 15.8" do
  action :update
  version: '15.8'
  edition: 'enterprise'

You can add workloads or components by using modify:
* Modify will always execute the installer, even if the added workload(s) already exist
* It is currently not possible to remove workloads or components

vs_2017 "Add .NET Framework 4.7.2 Targeting pack" do
  action :modify
  version: '15.9'
  edition: 'community'
  workloads ['Microsoft.Net.Component.4.7.2.TargetingPack']
  include_recommended true
  include_optional true

To bring a node, regardless of an existing older instance to a desired state, you can combine all three actions.
* install will only run if no VS2017 instance of the target edition is installed
* update will only run if the installed VS2017 instance of the target edition is older than the target version
* modify will always run, but will succeed silently if nothing is to be done.

vs_2017 'Install/Update/Modify VS2017 Community' do
  version '15.9'
  action [:install, :update, :modify]
  edition 'community'
  workloads [
  all_workloads false
  include_recommended true
  include_optional true

You can entirely remove a Instance:

vs_2017 "Remove Community" do
  action :remove

vs_2017 "Remove Enterprise" do
  action :remove
  edition 'enterprise'

Additional information

  • Currently, it is not possible to remove workloads or components of an installed edition
  • Modify will always run the installer with the modify command, but will succeed silently if nothing was added
  • You can install multiple editions simultaneously
  • You can have only on version of each edition installed

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric

1.1.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

1.1.0 passed this metric

Foodcritic Metric

1.1.0 passed this metric

No Binaries Metric

1.1.0 passed this metric

Testing File Metric

1.1.0 passed this metric

Version Tag Metric

1.1.0 passed this metric