TICS uses MSBuild
to analyze Visual Studio projects . These in turn are checked by the Visual Studio compilers for compiler warnings (Csc for C#, VC for C++).
The following property can be configured either on SERVER or PROJECT level:
BUILDTOOLS: MSBUILD: VSBUILDRELATIONSSLNROOT: [1|0]
The following property can optionally be configured on a PROJECT level. Please, note that configuring this property on SERVER.yaml will not have any effect:
BUILDTOOLS: MSBUILD: PROJECTCONFIGPLATFORM: {}
VSBUILDRELATIONSSLNROOT: 0|1This setting is optional; the default is 1. This means, TICS will only consider the files found in the main solution (build) file(s).
The VSBUILDRELATIONSSLNROOT
property can be used to allow C/C++/C#
files from Visual Studio projects not to be treated as unbuildable in
case the archive does not contain solution files for them.
The VSBUILDRELATIONSSLNROOT
property is used in the following contexts:
To change the default behavior, set VSBUILDRELATIONSSLNROOT: 0
.
If there is a need to analyze source code that is not part of the main solution (.sln) file(s), configuringBUILDTOOLS: MSBUILD: VSBUILDRELATIONSSLNROOT: 0
VSBUILDRELATIONSSLNROOT: 0
like this will make the source code buildable.
If this is not configured, TICS will consider those files unreachable, therefore, not analyzing them.
PROJECTCONFIGPLATFORM: ""This setting is optional and is used to set project configuration and platform for MSBuild.
The PROJECTCONFIGPLATFORM
property is used to override Configuration and Platform properties for MSBuild (Debug or Release, and Any CPU", "x86", and "x64" respectively).
The PROJECTCONFIGPLATFORM
property is used in the following contexts:
Note:BUILDTOOLS: MSBUILD: PROJECTCONFIGPLATFORM: test.csproj: 'Debug|AnyCPU'
PROJECTCONFIGPLATFORM
can also include other custom options.
By using the -config
option provided by TICS, it is possible to override the default Project Configuration and Platform (config|platform
, or config
) via Command Line.
TICSQServer -project projectName -branchname branchName -timeinfo -calc COMPILERWARNING,LOC,GLOC,ELOC,BUILDRELATIONS,PREPARE,CHANGEDFILES,INCLUDERELATIONS,FINALIZE,POSTANA -config "Release|AnyCPU"TICS -project -calc COMPILERWARNING -config Release C:/repo/your/file/here.cs
Note: Both the solution (.sln) and the project (.csproj, .vcxproj) files have configuration settings.
The contents of the -config
option should match the configuration as defined in the project file (so either the .csproj or the .vcxproj file - and not the configuration as defined in the .sln file), since this matches the use case in which TICS is invoked through the Visual Studio plugin.
Note: In the case no platform is passed, TICS will match on the configuration alone. So in the case -config Release is passed, TICS will still work, but you will not have easy control over which platform is used.