diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh
index f79e739f6aecb92648165c79f134918bb2ff7cf1..67cfc2bb0a4a839d93a8c53feb1cfc234e9ab724 100755
--- a/tools/jenkins/run_jenkins.sh
+++ b/tools/jenkins/run_jenkins.sh
@@ -63,10 +63,6 @@ then
   # Prevent msbuild from picking up "platform" env variable, which would break the build
   unset platform
 
-  # TODO(jtattermusch): integrate nuget restore in a nicer way.
-  /cygdrive/c/nuget/nuget.exe restore vsprojects/grpc.sln
-  /cygdrive/c/nuget/nuget.exe restore src/csharp/Grpc.sln
-
   python tools/run_tests/run_tests.py -t -l $language -x report.xml $@ || true
 
 elif [ "$platform" == "macos" ]
diff --git a/tools/run_tests/pre_build_c.bat b/tools/run_tests/pre_build_c.bat
new file mode 100644
index 0000000000000000000000000000000000000000..ac8a375ad7d88676012c563fac93b3217d865c57
--- /dev/null
+++ b/tools/run_tests/pre_build_c.bat
@@ -0,0 +1,21 @@
+@rem Performs nuget restore step for C/C++.
+
+setlocal
+
+@rem enter repo root
+cd /d %~dp0\..\..
+
+@rem Location of nuget.exe
+set NUGET=C:\nuget\nuget.exe
+
+if exists %NUGET% (
+  %NUGET% restore vsprojects/grpc.sln || goto :error
+)
+
+endlocal
+
+goto :EOF
+
+:error
+echo Failed!
+exit /b %errorlevel%
diff --git a/tools/run_tests/pre_build_csharp.bat b/tools/run_tests/pre_build_csharp.bat
new file mode 100644
index 0000000000000000000000000000000000000000..f5890c2743176d6aecd90d8cc21e7f5aed114e4e
--- /dev/null
+++ b/tools/run_tests/pre_build_csharp.bat
@@ -0,0 +1,22 @@
+@rem Performs nuget restore step for C#.
+
+setlocal
+
+@rem enter repo root
+cd /d %~dp0\..\..
+
+@rem Location of nuget.exe
+set NUGET=C:\nuget\nuget.exe
+
+if exists %NUGET% (
+  %NUGET% restore vsprojects/grpc_csharp_ext.sln || goto :error
+  %NUGET% restore src/csharp/Grpc.sln || goto :error
+)
+
+endlocal
+
+goto :EOF
+
+:error
+echo Failed!
+exit /b %errorlevel%
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 69a480ac850e2f1827f619f14872d3876653c6b6..d5036d55d8bd2d0cfd82f5fe82aaba260d100ec6 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -167,7 +167,10 @@ class CLanguage(object):
     return ['buildtests_%s' % self.make_target, 'tools_%s' % self.make_target]
 
   def pre_build_steps(self):
-    return []
+    if self.platform == 'windows':
+      return [['tools\\run_tests\\pre_build_c.bat']]
+    else:
+      return []
 
   def build_steps(self):
     return []
@@ -322,7 +325,7 @@ class CSharpLanguage(object):
 
   def pre_build_steps(self):
     if self.platform == 'windows':
-      return []
+      return [['tools\\run_tests\\pre_build_csharp.bat']]
     else:
       return [['tools/run_tests/pre_build_csharp.sh']]