Repository: bazelbuild/bazel
Issue: Package provided in Chocolatey does not declare a dependency
Labels: type: bug
P2
area-Windows
team-OSS

### Description of the problem / feature request:

`bazel` installed via Chocolatey does not declare dependency on VC Redist

### Feature requests: what underlying problem are you trying to solve with this feature?

I'm trying to use `bazel` to build code on Windows instance on GCE (specifically `windows-2019/windows-cloud`)

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

`choco install bazel`
`bazel version` => {
    `cmd` -> prints out empty string
    `bash` on `msys2` -> prints out `C:/ProgramData/chocolatey/bin/bazel.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory`
}

### What operating system are you running Bazel on?

Windows Server 2019

### What's the output of `bazel info release`?

```
$ bazel version                                                                                                                                           
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".                            
INFO: Invocation ID: aa5a2fea-ff69-4f76-b963-f7fb4f427831                                                                                                 
Build label: 0.22.0                                                                                                                                       
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar                                      
Build time: Mon Jan 28 12:59:27 2019 (1548680367)                                                                                                         
Build timestamp: 1548680367                                                                                                                               
Build timestamp as int: 1548680367 
```


###  Have you found anything relevant by searching the web?

Related: #5254

### Any other information, logs, or outputs that you want to share?

`choco install -y vcredist2015` should be ran to be able to use `bazel`
it should be either automatically installed or at least advised


Issue comments:
@petemounce -- could you please take a look?
FYI, @petemounce is currently on holiday, will be back in ~2 weeks, so I don't expect this to be addressed until late Feb/early March.
@RNabel , thanks for the heads-up!

@vmax , is this issue blocking you? Can you work around it until the package is updated?
@RNabel @laszlocsomor thank you! 

>Can you work around it until the package is updated?

Yes, using the hint I posted in `Any other information, logs, or outputs that you want to share?` in issue description

Pull request review comments:

Patch that resolved the issue:
diff --git a/scripts/packages/chocolatey/bazel.nuspec.template b/scripts/packages/chocolatey/bazel.nuspec.template
index 761d43f0e552c6..da5f5198aed3f4 100644
--- a/scripts/packages/chocolatey/bazel.nuspec.template
+++ b/scripts/packages/chocolatey/bazel.nuspec.template
@@ -78,6 +78,7 @@ Supply like `--params="/option:'value' ..."` ([see docs for --params](https://gi
       <dependency id="chocolatey-core.extension" version="1.0.7"/>
       <dependency id="msys2" version="[20160719.1.0,20160719.1.1]"/>
       <dependency id="python2" version="[2.7.11,3.0)"/>
+      <dependency id="vcredist140" version="14.20.27508.1"/>
     </dependencies>
     <!-- chocolatey-uninstall.extension - If supporting 0.9.9.x (or below) and including a chocolateyUninstall.ps1 file to uninstall an EXE/MSI, you probably want to include chocolatey-uninstall.extension as a dependency. Please verify whether you are using a helper function from that package. -->
 


Test patch: