I have a post-build event command line to build a project again:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe" "$(ProjectDir)ProfileTypes.csproj" /p:Configuration="DebugFinal"
This is working fine, however on someone else's pc, MSBuild.exe could be in a different directory, how can I get the directory of the MSBuild.exe without hard-coding it?