3.5.1. C# Build Executor Configuration

Visual Studio project files (.csproj) for C# projects are processed to examine inter-project dependencies, references to external assemblies, relevant source files and pre-processor options to be used. If Sonargraph is executed on Windows operating system, the latest C# installation is determined and MSBuild.exe is located. On other operating systems the built-in parser is used per default. If you have xbuild installed (the MSBuild implementation of the Mono platform), define the path to its executable here.

On Windows: For most accurate results, specify the Visual Studio Developer Prompt shell that is used to build the project. This ensures that the same assemblies (DLLs) are loaded that are also used by Visual Studio. Sonargraph tries to locate the latest Visual Studio Developer Prompt at startup. If that is not the correct one to be used, the following MSDN page provides additional information: https://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx You can right-click on the identified application and open the "save location" where you find the corresponding shortcut file. Right-click again on that file to open the properties and select the "Properties" tab. The executable can be found in the "Target" text field.

NOTE

The built-in parser is sufficient for simple Visual Studio project files. But if advanced features are used, e.g. variables like $(VSInstallDir), user profiles or conditional constructs, you need to use MSBuild or xbuild.

NOTE

A minimum "ToolsVersion" of 4.0 is required. This is fulfilled for Visual Studio 2010 and newer.

C# Build Executor
Figure 3.4. C# Build Executor