diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include
index 55ec37393fa..39c73860629 100644
--- a/templates/vsprojects/vcxproj_defs.include
+++ b/templates/vsprojects/vcxproj_defs.include
@@ -12,19 +12,21 @@
if t.name == name:
target = t
if not configuration_type and target:
+ print target.name
if target.build == 'test' or target.build == 'tool':
configuration_type = 'Application'
if not configuration_type:
configuration_type = 'StaticLibrary'
if not project_guid:
project_guid = project.vs_project_guid
+ if target.build == 'test' and target.language == 'c++':
+ props.extend(['cpptest'])
if configuration_type == 'Application':
+ print target.build
if target.build == 'protoc':
props.extend(['protoc'])
else:
props.extend(['winsock', 'protobuf', 'zlib', 'openssl'])
- if target.language == 'c++':
- props.extend(['protobuf'])
props.extend(['global'])
%>\
@@ -113,6 +115,13 @@ ${gen_package_props(packages)}\
${name}
+ % if "zlib" in packages:
+ static
+ Debug
+ % endif
+ % if "openssl" in packages:
+ Debug
+ % endif
${name}
@@ -200,8 +209,20 @@ ${gen_package_props(packages)}\
% if project.get('src',[]):
% for src_name in project.src:
+ % if src_name.endswith(".proto"):
+<% src_name_parts = src_name.split(".") %>\
+
+
+
+
+
+
+
+
+ % else:
+ % endif
% endfor
% elif configuration_type != 'StaticLibrary':
@@ -230,4 +251,4 @@ ${gen_package_targets(packages)}\
${gen_package_ensure(packages)}\
-%def>\
\ No newline at end of file
+%def>\
diff --git a/tools/buildgen/plugins/generate_vsprojects.py b/tools/buildgen/plugins/generate_vsprojects.py
index 150e72e0b26..413056fe89f 100755
--- a/tools/buildgen/plugins/generate_vsprojects.py
+++ b/tools/buildgen/plugins/generate_vsprojects.py
@@ -70,7 +70,7 @@ def mako_plugin(dictionary):
if project.get('vs_project_guid', None)]
projects = [project for project in projects
- if project['language'] != 'c++' or project['build'] == 'all' or project['build'] == 'protoc']
+ if project['language'] != 'c++' or project['build'] == 'all' or project['build'] == 'protoc' or (project['language'] == 'c++' and (project['build'] == 'test' or project['build'] == 'private'))]
project_dict = dict([(p['name'], p) for p in projects])