Hand-written changes
diff --git a/tools/buildgen/plugins/expand_bin_attrs.py b/tools/buildgen/plugins/expand_bin_attrs.py
index d221b3a..4f359e5 100755
--- a/tools/buildgen/plugins/expand_bin_attrs.py
+++ b/tools/buildgen/plugins/expand_bin_attrs.py
@@ -37,7 +37,7 @@
 def mako_plugin(dictionary):
   """The exported plugin code for expand_filegroups.
 
-  The list of libs in the build.json file can contain "filegroups" tags.
+  The list of libs in the build.yaml file can contain "filegroups" tags.
   These refer to the filegroups in the root object. We will expand and
   merge filegroups on the src, headers and public_headers properties.
 
diff --git a/tools/buildgen/plugins/expand_filegroups.py b/tools/buildgen/plugins/expand_filegroups.py
index f63072c..156bdc4 100755
--- a/tools/buildgen/plugins/expand_filegroups.py
+++ b/tools/buildgen/plugins/expand_filegroups.py
@@ -29,7 +29,7 @@
 
 """Buildgen expand filegroups plugin.
 
-This takes the list of libs from our json dictionary,
+This takes the list of libs from our yaml dictionary,
 and expands any and all filegroup.
 
 """
@@ -45,7 +45,7 @@
 def mako_plugin(dictionary):
   """The exported plugin code for expand_filegroups.
 
-  The list of libs in the build.json file can contain "filegroups" tags.
+  The list of libs in the build.yaml file can contain "filegroups" tags.
   These refer to the filegroups in the root object. We will expand and
   merge filegroups on the src, headers and public_headers properties.
 
diff --git a/tools/buildgen/plugins/generate_vsprojects.py b/tools/buildgen/plugins/generate_vsprojects.py
index 413056f..841a61f 100755
--- a/tools/buildgen/plugins/generate_vsprojects.py
+++ b/tools/buildgen/plugins/generate_vsprojects.py
@@ -57,14 +57,27 @@
   projects = []
   projects.extend(libs)
   projects.extend(targets)
-  if dictionary.get('debug', False):
-    for target in projects:
-      if not target.get('vs_project_guid', None) and 'windows' in target.get('platforms', ['windows']):
-        name = target['name']
-        guid = re.sub('(........)(....)(....)(....)(.*)',
-               r'{\1-\2-\3-\4-\5}',
-               hashlib.md5(name).hexdigest())
-        target['vs_project_guid'] = guid.upper()
+  for target in projects:
+    if 'build' in target and target['build'] == 'test':
+      default_test_dir = 'test'
+    else:
+      default_test_dir = '.'
+    if 'vs_config_type' not in target:
+      if 'build' in target and target['build'] == 'test':
+        target['vs_config_type'] = 'Application'
+      else:
+        target['vs_config_type'] = 'StaticLibrary'
+    if 'vs_packages' not in target:
+      target['vs_packages'] = []
+    if 'vs_props' not in target:
+      target['vs_props'] = []
+    target['vs_proj_dir'] = target.get('vs_proj_dir', default_test_dir)
+    if target.get('vs_project_guid', None) is None and 'windows' in target.get('platforms', ['windows']):
+      name = target['name']
+      guid = re.sub('(........)(....)(....)(....)(.*)',
+             r'{\1-\2-\3-\4-\5}',
+             hashlib.md5(name).hexdigest())
+      target['vs_project_guid'] = guid.upper()
   # Exclude projects without a visual project guid, such as the tests.
   projects = [project for project in projects
                 if project.get('vs_project_guid', None)]
@@ -74,5 +87,9 @@
 
   project_dict = dict([(p['name'], p) for p in projects])
 
+  packages = dictionary.get('vspackages', [])
+  packages_dict = dict([(p['name'], p) for p in packages])
+
   dictionary['vsprojects'] = projects
   dictionary['vsproject_dict'] = project_dict
+  dictionary['vspackages_dict'] = packages_dict
diff --git a/tools/buildgen/plugins/list_protos.py b/tools/buildgen/plugins/list_protos.py
index f12d726..2f2ac5e 100755
--- a/tools/buildgen/plugins/list_protos.py
+++ b/tools/buildgen/plugins/list_protos.py
@@ -29,7 +29,7 @@
 
 """Buildgen .proto files list plugin.
 
-This parses the list of targets from the json build file, and creates
+This parses the list of targets from the yaml build file, and creates
 a list called "protos" that contains all of the proto file names.
 
 """