Managing Xbox (One, Series X/S) native app builds¶
It is important to exclude the Suitest instrumentation library from your production build but to keep it in the instrumented build that you are going to upload to Suitest.
To achieve this comfortably it is best to create a dedicated build configuration. In Visual Studio 2017 you can do this in the following way:
Create a new configuration in the Configuration Manager and copy the settings from your "Release" configuration. Change the name of the copied configuration to "Suitest" (or to any other name you like).
Open project properties and on the Build tab select "Suitest" in the Configuration field. Then append
;SUITESTto the contents of Conditional compilation symbols field.
Unload project (right click project name in Solution Explorer and choose Unload Project).
.csprojfile in the text editor and locate the Suitest package reference. It should look approximately like this:
<PackageReference Include="Suitest"> <Version>1.*.*</Version> </PackageReference>
Replace the above with (make sure to always use the latest instrumentation library version):
<Choose> <When Condition=" '$(Configuration)' == 'Suitest' "> <ItemGroup> <PackageReference Include="Suitest"> <Version>1.*.*</Version> </PackageReference> </ItemGroup> </When> </Choose>
Save and close the
.csprojfile and reload the project (right click on the project name and select Reload Project).
After you have done this only builds created with the Suitest configuration will contain the instrumentation library. All other builds will be completely clean of the instrumentation code.