Closed survivorbat closed 5 years ago
Update: I tested it with a fresh project and the same error occurs
Hello @survivorbat
I've been trying to recreate your problem to no avail. Here's a summary of what I've done according to your comments so you can compare it with your notes:
$ dotnet new sln -n survivorbat -o survivorbat
$ cd survivorbat
$ dotnet new mvc -n frontend -o ./src/Frontend
$ dotnet sln add ./src/Frontend/frontend.csproj
$ echo "FROM nosinovacao/dotnet-sonar:19.10.1
WORKDIR /app
COPY ./src/Frontend /app
RUN dotnet restore \\
&& dotnet /sonar-scanner/SonarScanner.MSBuild.dll begin \\
/k:survivorbat-frontend \\
/d:sonar.login=(login) \\
/d:sonar.password=(login) \\
/d:sonar.host.url=(sonar-host) \\
&& dotnet build \\
&& dotnet /sonar-scanner/SonarScanner.MSBuild.dll end \\
/d:sonar.login=(login) \\
/d:sonar.password=(login)" >> Dockerfile
If you run SonarScanner at this point, it will fail with the following error message:
WARNING: The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis...
/app/frontend.csproj
No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details.
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
This means the csproj lacks the \
$ docker build --no-cache -t survivorbat:latest .
And this works just fine for me.
How bizarre, I'll go and investigate what the issue is with my projects
I just discovered something major, look at this folder:
All of these files have windows backslashes, but why does your version work without problem?
Our fix: We're running the pipeline in a windows vm for now, since coverage also only works in windows anyway.
According to our professors, this is a bug in a sonarqube plugin that the server we use is running, so it has nothing to do with the dockerfile.
Sorry for not providing a 'solution' earlier, my classmates told me they found this issue and experienced the same issue.
Seems to be related:
Error
My dockerfile to reproduce
My .csproj file
Notes
The build works entirely without sonarscanner, I just can't find what is causing this weird manifest error, I've tried it before with my own image and wanted to try out this one, unfortunately this one has the same error.