= Run builds without the Visual Studio GUI =
Sometimes you can get away with just calling MSBuild against a solution or project file. For convenience, here's some example paths:
```
lang=sh
# Visual Studio 2008
"C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe"
# Visual Studio 2015 32-bit and 64-bit
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
"C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe"
# Visual Studio 2017
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
# Visual Studio 2019
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
# Visual Studio 2022
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
# If you have a new enough version, this should locate it and describe it
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
```
= Have multiple builds run without killing eachother =
If you're running more than one build at once (especially with MSBuild, maybe also true of Visual Studio itself?) you may run into
(IMPORTANT) LINK : fatal error LNK1318: Unexpected PDB error; RPC (23) '(0x000006BA)'
This is because the build process fires up an instance of PDBServe if one doesn't exist but uses existing ones if one is running, and then terminates that once the build is done. Which means if you start a second build while another build is running, well . . .
See https://github.com/rust-lang/rust/issues/33145#issuecomment-214577593 and https://codereview.chromium.org/83803003, which details that there's a secret undocumented environment variable to control what PDBServe instance is being used: `_MSPDBSRV_ENDPOINT_`. This led @keithzg to solve things in Jenkins builds like this:
```
lang=groovy
_MSPDBSRV_ENDPOINT_ = UUID.randomUUID()
}
```