Inner builds lose custom toolsets when building programatically
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### Steps to reproduce
Minimal repro located here: https://github.com/dfederm/msbuild/tree/inner-build-loses-toolset/src/Samples/InnerBuildToolsetLost
After building, run something like:
`"artifacts\Debug\bin\Samples\InnerBuildToolsetLost\net46\InnerBuildToolsetLost.exe" "C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin\"`
### Expected behavior
Output:
```
Build succeeded
Log lines:
MsBuildToolsPath for OuterProject.proj: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin
MsBuildToolsPath for InnerProject.proj: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin
Toolsets were the same
```
### Actual behavior
Output:
```
Build succeeded
Log lines:
MsBuildToolsPath for OuterProject.proj: C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin
MsBuildToolsPath for InnerProject.proj: D:\msbuild\artifacts\Debug\bin\Samples\InnerBuildToolsetLost\net46
Toolsets were not the same!
```
### Environment data
Using the latest version of Microsoft.Build.Runtime (15.5.180.1)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.