From e2d6d2b0be43ef58da5fdd45691e55f4413e099d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Fri, 16 Oct 2020 16:59:28 +0200 Subject: [PATCH 1/6] use SonarScanner --- build/build.fsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/build.fsx b/build/build.fsx index 48766de0..6f82b13a 100644 --- a/build/build.fsx +++ b/build/build.fsx @@ -37,11 +37,11 @@ Target "RestorePackages" (fun _ -> ) Target "BeginSonarQube" (fun _ -> - "msbuild-sonarqube-runner" |> Choco.Install id + "sonarscanner-msbuild-net46" |> Choco.Install id SonarQube Begin (fun p -> {p with - ToolsPath = "MSBuild.SonarQube.Runner.exe" + ToolsPath = "SonarScanner.MSBuild.exe" Key = "laedit_vika" Name = "Vika" Version = version @@ -59,7 +59,7 @@ Target "BeginSonarQube" (fun _ -> Target "EndSonarQube" (fun _ -> SonarQube End (fun p -> {p with - ToolsPath = "MSBuild.SonarQube.Runner.exe" + ToolsPath = "SonarScanner.MSBuild.exe" Settings = [ "sonar.login=" + environVar "SonarQube_Token" ] }) ) From 16ebf3aefe6609879d3af19adc2fb9f030f875d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 17 Oct 2020 06:53:02 +0200 Subject: [PATCH 2/6] fix sonarscanner call --- build/build.fsx | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/build/build.fsx b/build/build.fsx index 6f82b13a..973c3d26 100644 --- a/build/build.fsx +++ b/build/build.fsx @@ -39,21 +39,9 @@ Target "RestorePackages" (fun _ -> Target "BeginSonarQube" (fun _ -> "sonarscanner-msbuild-net46" |> Choco.Install id - SonarQube Begin (fun p -> - {p with - ToolsPath = "SonarScanner.MSBuild.exe" - Key = "laedit_vika" - Name = "Vika" - Version = version - Settings = [ - "sonar.host.url=https://sonarcloud.io"; - "sonar.login=" + environVar "SonarQube_Token"; - "sonar.projectDescription=\"Visual Interpreter of Kooky Analysis: parse analysis reports and send messages to the build server, or in console.\""; - "sonar.links.homepage=https://github.com/laedit/vika"; - "sonar.links.ci=https://ci.appveyor.com/project/laedit/vika"; - "sonar.links.issue=https://github.com/laedit/vika/issues"; - "sonar.organization=laedit-github" - ] }) + directExec(fun info -> + info.FileName <- "SonarScanner.MSBuild.exe" + info.Arguments <- "begin /k:\"laedit_vika\" /n:\"Vika\" /o:laedit-github /v:\"" + version + "\" /d:sonar.host.url=https://sonarcloud.io /d:sonar.login=" + environVar "SonarQube_Token" + " /d:sonar.projectDescription=\"Visual Interpreter of Kooky Analysis: parse analysis reports and send messages to the build server, or in console.\" /d:sonar.links.homepage=https://github.com/laedit/vika /d:sonar.links.ci=https://ci.appveyor.com/project/laedit/vika /d:sonar.links.issue=https://github.com/laedit/vika/issues" ) |> ignore ) Target "EndSonarQube" (fun _ -> From 62fbabd0e7d1c25eed9f4da8d7730b5e31d9fc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 17 Oct 2020 07:41:41 +0200 Subject: [PATCH 3/6] specify tollset to use with inspect code --- build/build.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.fsx b/build/build.fsx index 973c3d26..ba35cbf3 100644 --- a/build/build.fsx +++ b/build/build.fsx @@ -63,7 +63,7 @@ Target "InspectCodeAnalysis" (fun _ -> directExec(fun info -> info.FileName <- "inspectcode" - info.Arguments <- "/o=\"" + artifactsDir + "inspectcodereport.xml\" /project=\"NVika\" \"src\Vika.sln\"" ) |> ignore + info.Arguments <- "-o=\"" + artifactsDir + "inspectcodereport.xml\" --project=\"NVika\" \"src\Vika.sln\" --toolset-path=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"" ) |> ignore ) let saveGendarmeReportAsGist report = From 7484794a5156abb411148f1bc8795e203c52a3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 17 Oct 2020 07:51:25 +0200 Subject: [PATCH 4/6] fix toolset used --- build/build.fsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build.fsx b/build/build.fsx index ba35cbf3..a767ca0d 100644 --- a/build/build.fsx +++ b/build/build.fsx @@ -63,7 +63,7 @@ Target "InspectCodeAnalysis" (fun _ -> directExec(fun info -> info.FileName <- "inspectcode" - info.Arguments <- "-o=\"" + artifactsDir + "inspectcodereport.xml\" --project=\"NVika\" \"src\Vika.sln\" --toolset-path=\"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"" ) |> ignore + info.Arguments <- "-o=\"" + artifactsDir + "inspectcodereport.xml\" --project=\"NVika\" \"src\Vika.sln\" --toolset=14.0" ) |> ignore ) let saveGendarmeReportAsGist report = From 1f9f35fd3dc1afdb82225398ebf5a8c0c8795813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 17 Oct 2020 08:01:47 +0200 Subject: [PATCH 5/6] fix path to SonarAnalyzer assemblies --- src/NVika/NVika.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NVika/NVika.csproj b/src/NVika/NVika.csproj index 4431cf3a..951817c9 100644 --- a/src/NVika/NVika.csproj +++ b/src/NVika/NVika.csproj @@ -125,9 +125,9 @@ - - - + + + From f517236b07e5eb677e3537e14a5563da46c8416a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bertrand?= Date: Sat, 17 Oct 2020 08:16:36 +0200 Subject: [PATCH 6/6] fix path to System.Net.Http.Formatting --- src/NVika/NVika.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NVika/NVika.csproj b/src/NVika/NVika.csproj index 951817c9..072f7645 100644 --- a/src/NVika/NVika.csproj +++ b/src/NVika/NVika.csproj @@ -81,9 +81,9 @@ ..\packages\System.IO.Abstractions.3.0.2\lib\net40\System.IO.Abstractions.dll - + False - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll