The use of MSBuild 12 or the sonar-scanner to analyze C# projects is DEPRECATED

663 views
Skip to first unread message

Subhi Andrews

unread,
Jan 4, 2017, 2:18:40 PM1/4/17
to SonarQube
How do I get rid of this warning? We are using msbuild14 for our project. I still keep getting this:
Sensor C#
error	04-Jan-2017 10:45:47	WARN: ***********************************************************************************
error	04-Jan-2017 10:45:47	WARN: *                 Use MSBuild 14 to get the best analysis results                 *
error	04-Jan-2017 10:45:47	WARN: * The use of MSBuild 12 or the sonar-scanner to analyze C# projects is DEPRECATED *
error	04-Jan-2017 10:45:47	WARN: ***********************************************************************************

We updated Tools Version in .csproj files to "14.0":

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{EE69EACD-320A-49F7-AB2E-BCEFC05932C0}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ConfigMonitor</RootNamespace>
    <AssemblyName>ConfigMonitor</AssemblyName>
    <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
    <TargetFrameworkProfile>
    </TargetFrameworkProfile>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>

Let me know if anyone can help fix this.

Regards,
Subhi.

sasi...@gmail.com

unread,
Jan 5, 2017, 4:43:42 AM1/5/17
to SonarQube
Hi,

Change the solution compilation to VS2015 in "Build Solution " task.











//Sasi

Subhi Andrews

unread,
Jan 5, 2017, 10:43:40 AM1/5/17
to SonarQube, sasi...@gmail.com
Hi Sasi,

Thanks for the response. Where do I find this task? We are using Atlassian Bamboo for continuous integration. Is this some sort of Jenkins Interface?

Tamas Vajk

unread,
Jan 11, 2017, 3:06:51 AM1/11/17
to Subhi Andrews, SonarQube, sasi...@gmail.com
Hello,

If you're using the sonar-scanner directly for the analysis, then only a file-by-file analysis is happening. When analyzing .NET projects, please use the Scanner for MsBuild, to take advantage of all the msbuild14 (Roslyn) benefits.

Tamas

Tamas VAJK | SonarSource
Language Team

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/c9dea2a2-2130-4983-a4ed-10bee3773c31%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Subhi Andrews

unread,
Jan 13, 2017, 1:53:24 PM1/13/17
to SonarQube, sub...@gmail.com, sasi...@gmail.com
We were using a bamboo plugin and that was using MSBuild12 internally. I decided to use the MSBuild Scanner command with begin and end directly ( instead of using plugin for running the scanner) and that resolved the issue.

Thanks,
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages