Recording C# applications with RevDeBug
Estimated reading time: 2 mins
Last edited: 04 Nov 2019
In this chapter you will learn how to implement RevDeBug into your C# building pipeline.
- C# project configuration
- Configuring DevOps Monitor
- any .NET application, providing, that it is either:
- .NET Framework 4.0+
- .NET Core 2.1+
- .NET Core 2.0 - if your projects are referencing Microsoft.AspNetCore.All 2.0.5 or higher
Feel free to use our .NET Demo application
First we need to create a file named Directory.Build.props in your solution catalog. Or, if you have a non-standard solution directory tree, create this file in the first common root of the solution and project files. Then 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:
- 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>
- There are two storage types you can use TCP or CrashRecorder. Storage mode means the recording mode. You can read more about the recording modes here: Recording Modes
<RevDeBugStateStorageType>TCP or CrashRecorder</RevDeBugStateStorageType>
- 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>
- 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.
Last step - Build.Tools
Once you have created this file, you need to add RevDeBug.BuildTools NuGet package to your application. They are needed to attach RevDeBug Compiler to your projects build pipeline.
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!