adjust C# win artifact build
diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py
index 005d997..aba7b8a 100644
--- a/tools/run_tests/artifacts/artifact_targets.py
+++ b/tools/run_tests/artifacts/artifact_targets.py
@@ -183,24 +183,14 @@
self.labels = ['artifact', 'csharp', platform, arch]
def pre_build_jobspecs(self):
- if self.platform == 'windows':
- return [create_jobspec('prebuild_%s' % self.name,
- ['tools\\run_tests\\helper_scripts\\pre_build_c.bat'],
- shell=True,
- flake_retries=5,
- timeout_retries=2)]
- else:
- return []
+ return []
def build_jobspec(self):
if self.platform == 'windows':
- msbuild_platform = 'Win32' if self.arch == 'x86' else self.arch
+ cmake_arch_option = 'Win32' if self.arch == 'x86' else self.arch
return create_jobspec(self.name,
['tools\\run_tests\\artifacts\\build_artifact_csharp.bat',
- 'vsprojects\\grpc_csharp_ext.sln',
- '/p:Configuration=Release',
- '/p:PlatformToolset=v120',
- '/p:Platform=%s' % msbuild_platform],
+ cmake_arch_option],
shell=True)
else:
environ = {'CONFIG': 'opt',
diff --git a/tools/run_tests/artifacts/build_artifact_csharp.bat b/tools/run_tests/artifacts/build_artifact_csharp.bat
index 24c8d48..f84ebc5 100644
--- a/tools/run_tests/artifacts/build_artifact_csharp.bat
+++ b/tools/run_tests/artifacts/build_artifact_csharp.bat
@@ -29,10 +29,16 @@
@rem Builds C# artifacts on Windows
-@call vsprojects\build_vs2013.bat %* || goto :error
+set ARCHITECTURE=%1
+
+@call tools\run_tests\helper_scripts\pre_build_csharp.bat %ARCHITECTURE% || goto :error
+
+cd cmake\build\%ARCHITECTURE%
+cmake --build . --target grpc_csharp_ext --config Release
+cd ..\..\..
mkdir artifacts
-copy /Y vsprojects\Release\grpc_csharp_ext.dll artifacts || copy /Y vsprojects\x64\Release\grpc_csharp_ext.dll artifacts || goto :error
+copy /Y cmake\build\Win32\Release\grpc_csharp_ext.dll artifacts || copy /Y cmake\build\x64\Release\grpc_csharp_ext.dll artifacts || goto :error
goto :EOF