Your build log has hundreds of warnings like the following:
CSC : warning CS8032: An instance of analyzer SonarAnalyzer.Rules.CSharp.SwitchDefaultClauseEmpty cannot be created from C:\TeamCity\BuildAgent\temp\buildTmp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
That suggests the version of MSBuild installed on your build agent is too old. You need version MSBuild v14.0.25420.1 or higher.