Closed fergek-ms closed 3 years ago
If your .NET project or solution file isn't located in the repository root, you need to specify the path to it with the dotnetBuildArguments
parameter. See example here:
https://github.com/highbyte/sonarscan-dotnet#build-subfolder-src-and-include-code-coverage
Did you manage to get your action working?
I've got the same issue tho. '.sln' file is localized in the repository root but still doesn't work..
If you want to have a look at the repo see SVYSHE/Jobb
It seems you'll need to add a step before sonarscan-dotnet step, to checkout the repo. Otherwise the sonarscan-dotnet step doesn't have access to any source code to build/scan.
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: sonarscan-dotnet
uses: highbyte/sonarscan-dotnet@2.0
with:
...
I'm relatively new to the github pipelines, so sorry that i ask you, how this additional step would look like..
Well after I read your answer a second time, i finally got, what you wanted to say and the pipeline's running 😂
Thanks for the quick help! My problems are solved so from my point of view you can close this issue :)
@SVYSHE No problem :)
I'm closing this issue. @fergek-ms if you still have an issue, feel free to open another one with details on how your repo looks like (folder structure for .sln/.csproj files).
Hi!
I'm trying to send data to my on premise SonarQube using this sonarscan-dotnet.
I'll add here the content of my .YML file
When the github action runs I can see on the logs the following error:
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
Is there anything you see in my YML file that I have to correct to get this working?
Thanks in advance.