How to analyze existing .cs files with SonarQube Scanner for MSBuild?

跟風遠走 提交于 2019-12-12 16:30:13

问题


I want to scan existing .cs files with sonarqube.

I understood that I need to use SonarQube Scanner for MSBuild, and this one requires to create a project to analyze. So I created a project on Visual studio from existing files and declared it as Class Library. But while executing SonarQube Scanner for MSBuild, I've got this error:

WARNING: The project has an invalid GUID "00000000-0000-0000-0000-
000000000000". The project will not be analyzed by SonarQube. Project 
file: C:\Users\sas1\Documents\Visual Studio 
2015\Projects\MSBuildTest\MSBuildTest.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.
09:54:16.866  Creating a summary markdown file...
09:54:16.872  Post-processing failed. Exit code: 1

I can not create a console application with those files, because thus I will have many compilation errors, which I am not supposed to correct, since the code is not mine, but just delegated to me.

So my question is: if someone gives me several .cs files to analyze using SonarQube, how can I analyse them using SonarQube Scanner for MSBuild?

Thank you

来源:https://stackoverflow.com/questions/44920478/how-to-analyze-existing-cs-files-with-sonarqube-scanner-for-msbuild

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!