AppVeyor build failing on .net core


(Michael Brown) #1

I haven’t been able to get sonarqube to work on AppVeyor for a .net core build. The error I’m getting is:

dotnet : Failed to create an empty directory 'C:\projects\project\Solution\.sonarqube'. 
Please check that there are no open or read-only files in the directory and that you have the necessary read/write permissions.

Is there a trick to getting it working? The build script is:

dotnet tool install -g dotnet-sonarscanner
dotnet sonarscanner begin /k:"project" /d:sonar.organization="organization" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="examplelogin"

dotnet build .\folder\MYSOLUTION.sln
dotnet sonarscanner end/d:sonar.login="examplelogin"

(Michael Brown) #2

Fixed. The error threw me off.

This line: dotnet sonarscanner end/d:sonar.login="examplelogin"
should be: dotnet sonarscanner end /d:sonar.login="examplelogin"