Implement RevDeBug into your CI
Here's a way to implement RevDeBug into your Continous Integration Pipeline in order to make the distribution process even easier. We will show you how to set everything up.
Estimated reading time: 10 minutes
In this chapter you will learn how to:
Create a file in your solution catalog
Create a file named
Directory.Build.props in your solution catalog and paste the following code into it:
<Project> <PropertyGroup Condition="'$(RevDeBugDisableNuget)' != 'true'"> <RevDeBugActive>true</RevDeBugActive> <UseRevDeBugOnThisProject>true</UseRevDeBugOnThisProject> <RevDeBugStateStorageType>CrashRecorder</RevDeBugStateStorageType> <SendToServer>true</SendToServer> <RecorderAddress>[Server IP address or hostname]</RecorderAddress> <RecorderTCPPort>42734</RecorderTCPPort> <RevDeBugMetadataPath>$(RevDeBugCompilerPath)\Metadata</RevDeBugMetadataPath> </PropertyGroup> <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'"> <isNetCore>true</isNetCore> </PropertyGroup> </Project>
There are four customizable fields in this file:
There are two storage types you can use TCP or CrashRecorder. Storage mode means the recording mode. You can read more about the recording mdoes here: Recording Modes
<RevDeBugStateStorageType>TCP or CrashRecorder</RevDeBugStateStorageType>
Usually, by default you need two ports open for your recording server 42733 and 42734 and don't need to change this field unless you would like to use different ports.
Here you have to enter your recording servers IP address or hostname (If you're using Docker use the Ifconfig command to get the IP address)
<RecorderAddress>Server IP address or hostname</RecorderAddress>
If you'd like to turn off RevDeBug for particular build of your application change this line to false. Make sure to later change it back to true, otherwise your application won't be recorded! (And you will break our hearts)
<RevDeBugActive>true or false</RevDeBugActive>
Open your solution in the Visual Studio
Once you have created the file, open the solution in Visual Studio. Right click on your solution in the Solution Manager and choose “Manage NuGet Packages for Solution…” and search for RevDeBug.BuildTools. They are needed to attach RevDeBug Compiler to your projects build pipeline. Click on it and choose which projects you would like to add RevDeBug to.
Once the BuildTools are installed, you can commit the changes to your Build Server and that’s all! Your application will be built with RevDeBug!