Добрый вечер,
Я использую отсюда версию .Net Core 2.0 https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild для проекта 2.1 в Jenkins с:
withSonarQubeEnv('SonarQubeMain') {
bat "dotnet ${globals.SONAR_QUBE_MSBUILD_PATH}\\SonarScanner.MSBuild.dll begin /k:\"${globals.SONAR_QUBE_PROJECT}\" /d:sonar.host.url=${globals.SONAR_HOST_URL} /d:sonar.cs.xunit.reportsPaths=\"XUnit.xml\" /d:sonar.cs.opencover.reportsPaths=\"coverage.xml\"
}
bat "dotnet build --version-suffix ${env.BUILD_NUMBER}"
dir('test/mytestprojecthere') {
bat 'D:\\OpenCover\\OpenCover.Console.exe -target:"c:\\Program Files\\dotnet\\dotnet.exe" -targetargs:"xunit --no-build -xml XUnit.xml" -output:coverage.xml -oldStyle -filter:"-[*Tests*]*" -register:user'
}
withSonarQubeEnv('SonarQubeMain') {
bat "dotnet ${globals.SONAR_QUBE_MSBUILD_PATH}\\SonarScanner.MSBuild.dll end"
}
Он работает первымсборка, но при следующей сборке он завершается неудачно с:
Failed to create an empty directory 'D:\Jenkins\workspace\xxxxxxxx\.sonarqube'.
Please check that there are no open or read-only files in the directory and that you have the necessary read/write permissions.
Detailed error message: Access to the path 'SonarScanner.MSBuild.Common.dll' is denied.
и проверяя мой сервер Windows, я вижу несколько процессов .Net Core Host Background.Если я убью их, я смогу собрать их снова.
Я читал о msbuild /nodereuse:false
для MSBuild, но, похоже, не работает для версии ядра dotnet?