Here is the settings you need to do for creating team build for WiX projects.
Add the following piece of code in the .proj file;
<PropertyGroup>
<CustomBeforeWixTargets>$(MSBuildExtensionsPath)\Microsoft\WiX\v3.0\wix.ca.targets</CustomBeforeWixTargets>
</PropertyGroup>
<Target Name="Wix">
<Message Importance="low" Text="Starting WIX build"/>
<MSBuild Projects="@(WixProjectToBuild)" Properties="OutDir=$(OutDir);SourcePath=$(OutDir);Version=$(AssemblyVersion);FileVersion=$(AssemblyFileVersion);BuildNumber=$(BuildNumber);CustomBeforeWixTargets=$(CustomBeforeWixTargets)" Targets="Rebuild"></MSBuild>
</Target>
<!--WIX solutions-->
<ItemGroup>
<WixProjectToBuild Include="$(BuildProjectFolderPath)/../../Source_Code/Development/Deployment/AAS.Database.Setup/AAS.Database.Setup.sln" />
</ItemGroup>
Also ensure that you have the enough configurations set for processor settings;
<ConfigurationToBuild Include="Debug|x86">
<FlavorToBuild>Debug</FlavorToBuild>
<PlatformToBuild>x86</PlatformToBuild>
</ConfigurationToBuild>
<ConfigurationToBuild Include="Debug|Any CPU">
<FlavorToBuild>Debug</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>
<CustomBeforeWixTargets>$(MSBuildExtensionsPath)\Microsoft\WiX\v3.0\wix.ca.targets</CustomBeforeWixTargets>
</PropertyGroup>
<Target Name="Wix">
<Message Importance="low" Text="Starting WIX build"/>
<MSBuild Projects="@(WixProjectToBuild)" Properties="OutDir=$(OutDir);SourcePath=$(OutDir);Version=$(AssemblyVersion);FileVersion=$(AssemblyFileVersion);BuildNumber=$(BuildNumber);CustomBeforeWixTargets=$(CustomBeforeWixTargets)" Targets="Rebuild"></MSBuild>
</Target>
<!--WIX solutions-->
<ItemGroup>
<WixProjectToBuild Include="$(BuildProjectFolderPath)/../../Source_Code/Development/Deployment/AAS.Database.Setup/AAS.Database.Setup.sln" />
</ItemGroup>
Also ensure that you have the enough configurations set for processor settings;
<ConfigurationToBuild Include="Debug|x86">
<FlavorToBuild>Debug</FlavorToBuild>
<PlatformToBuild>x86</PlatformToBuild>
</ConfigurationToBuild>
<ConfigurationToBuild Include="Debug|Any CPU">
<FlavorToBuild>Debug</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>