Sonarscanner ignore file aspx.cs

hello i’ve used sonarscanner sonar-scanner-cli-4.0.0.1744
my project is c# asp.net

I noticed that the .cs files are not taken into consideration
but also .aspx file is scanning what?

other bugs

if i using sonar-scanner-ms file aspx and file aspx.cs is ignored

I’m noticing that sonar is full of these bugs but nobody talks about it

tnx

hi @nturri1306 and welcome to our community!

For MSBuild projects (which is your case), please use SonarScanner for MSBuild instead of sonar-scanner-cli. This should fix your problem.

hello yes i’ve used this with SonarQube.Scanner.MSBuild.exe
but have opposite problem

not analyze .aspx file and ignore .aspx.cs

I believe the bug is serious
you can’t deny it

you did a great job in the cms but the scanners are not good

the problems must be solved

tnx

are the .aspx.cs files part of your .csproj file?

In order to be able to help you, could you please share:

  • version of sonarqube
  • version of sonar scanner for msbuild
  • version of net framework
  • the commands you are running
  • the verbose output of the command (please run SonarScanner.MSBuild.exe begin /k:"MyProject" /d:sonar.verbose=true as the begin step, and please attach the output of command here)

set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
C:\sonar-ms46\SonarScanner.MSBuild.exe begin /k:“membrana_amniotica”

“C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe” “C:\inetpub\wwwroot\bmembrana\bmembrana.sln” /t:Rebuild /p:Configuration=Debug /p:Platform=“Any CPU”

C:\sonar-ms46\SonarScanner.MSBuild.exe end

this is a asp.net project but aspx and aspx.cs is ignored

thanks for the update.

In order to be able to help you, could you please share:

  • version of sonarqube
  • the verbose output of the command (please run SonarScanner.MSBuild.exe begin /k:"MyProject" /d:sonar.verbose=true as the begin step, and please attach the output of command here)

18:56:49.066 DEBUG: Report metadata written to c:\sonar-ms46.sonarqube\out.sonar\report-task.txt
18:56:49.070 DEBUG: Post-jobs :
18:56:49.072 INFO: Analysis total time: 3.596 s
18:56:49.074 INFO: ------------------------------------------------------------------------
18:56:49.074 INFO: EXECUTION SUCCESS
18:56:49.074 INFO: ------------------------------------------------------------------------
18:56:49.074 INFO: Total time: 4.965s
18:56:49.110 INFO: Final Memory: 11M/33M
18:56:49.110 INFO: ------------------------------------------------------------------------
Process returned exit code 0
The SonarQube Scanner has finished
18:56:49.137 Post-processing succeeded.

“C:\inetpub\wwwroot\bmembrana\bmembrana.sln” (destinazione: Rebuild) (1) ->
“C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj” (destinazione: Rebuild) (2) ->
(destinazione: Rebuild) ->
c:\inetpub\wwwroot\bmembrana\App_Code\PageSuper.cs(44): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\PDFAutomaticReport.cs(197): warning CS0168: La variabile ‘ex2’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmem
brana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\PageUtility.cs(85): warning CS0168: La variabile ‘ex1’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_
1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\PageUtility.cs(96): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1
.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\Util.cs(70): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana

1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\Util.cs(546): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana
1.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(54): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana
\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(211): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembran
a\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(325): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembran
a\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(1305): warning CS0219: La variabile ‘anno’ è assegnata ma il suo valore non è mai usato. [C:\inetpub\wwwroot\bme
mbrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(4043): warning CS0219: La variabile ‘formattaData’ è assegnata ma il suo valore non è mai usato. [C:\inetpub\www
root\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(4094): warning CS0219: La variabile ‘sqlValori’ è assegnata ma il suo valore non è mai usato. [C:\inetpub\wwwroo
t\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(4095): warning CS0219: La variabile ‘formattaData’ è assegnata ma il suo valore non è mai usato. [C:\inetpub\www
root\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(4534): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembra
na\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\classi\DBAccess.cs(5128): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembra
na\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\Tempo.cs(76): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana
1.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\Tempo.cs(108): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembran
a_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\GlobalVars.cs(49): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmem
brana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\GlobalVars.cs(45): warning CS0162: Rilevato codice non eseguibile. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\GlobalVars.cs(78): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmem
brana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\GlobalVars.cs(99): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmem
brana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\App_Code\utility\GlobalVars.cs(134): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bme
mbrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\cornea\18_certificato_cornea.aspx.cs(19): warning CS0108: ‘moduli_cornea_18_certificato_cornea.PDFExportPath’ nasconde il membro ereditato ‘P
ageSuper.PDFExportPath’. Se ciò è intenzionale, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\cornea\18_certificato_cornea.aspx.cs(19): warning CS0169: Il campo ‘moduli_cornea_18_certificato_cornea.PDFExportPath’ non è mai utilizzato [
C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\revisione_scheda_informativa.aspx.cs(24): warning CS0108: ‘moduli_revisione_scheda_informativa.PDFExportPath’ nasconde il membro ereditato ‘P
ageSuper.PDFExportPath’. Se ciò è intenzionale, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\scheda_richiesta_tessuti.aspx.cs(20): warning CS0108: ‘moduli_scheda_richiesta_tessuti.PDFExportPath’ nasconde il membro ereditato ‘PageSuper
.PDFExportPath’. Se ciò è intenzionale, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\revisione_scheda_informativa.aspx.cs(468): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot
bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\scheda_richiesta_tessuti.aspx.cs(90): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmemb
rana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\scheda_richiesta_tessuti.aspx.cs(519): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmem
brana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\revisione_scheda_informativa.aspx.cs(24): warning CS0169: Il campo ‘moduli_revisione_scheda_informativa.PDFExportPath’ non è mai utilizzato [
C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\scheda_richiesta_tessuti.aspx.cs(20): warning CS0169: Il campo ‘moduli_scheda_richiesta_tessuti.PDFExportPath’ non è mai utilizzato [C:\inetp
ub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\moduli\scheda_richiesta_tessuti.aspx.cs(27): warning CS0414: Il campo ‘moduli_scheda_richiesta_tessuti.modalita_followup’ è assegnato, ma il relativ
o valore non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\upload\allegati.aspx.cs(111): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_
1_.metaproj]
c:\inetpub\wwwroot\bmembrana\upload\allegati.aspx.cs(144): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_
1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_lenticolo.aspx.cs(19): warning CS0108: ‘dati_lenticolo.dbAccess’ nasconde il membro ereditato ‘PageSuper.dbAccess’. Se ciò è intenzionale, util
izzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_lenticolo.aspx.cs(21): warning CS0108: ‘dati_lenticolo.log’ nasconde il membro ereditato ‘PageSuper.log’. Se ciò è intenzionale, utilizzare la
parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_lenticolo.aspx.cs(23): warning CS0108: ‘dati_lenticolo.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è intenzio
nale, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_sclera.aspx.cs(19): warning CS0108: ‘dati_sclera.dbAccess’ nasconde il membro ereditato ‘PageSuper.dbAccess’. Se ciò è intenzionale, utilizzare
la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_sclera.aspx.cs(21): warning CS0108: ‘dati_sclera.log’ nasconde il membro ereditato ‘PageSuper.log’. Se ciò è intenzionale, utilizzare la parola
chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_sclera.aspx.cs(23): warning CS0108: ‘dati_sclera.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è intenzionale,
utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_accettazione.aspx.cs(23): warning CS0108: ‘dati_accettazione.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è in
tenzionale, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_accettazione.aspx.cs(24): warning CS0108: ‘dati_accettazione.utilita’ nasconde il membro ereditato ‘PageSuper.utilita’. Se ciò è intenzionale,
utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_cornea.aspx.cs(23): warning CS0108: ‘dati_cornea.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è intenzionale,
utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\assenso.aspx.cs(25): warning CS0108: ‘assenso.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è intenzionale, utilizza
re la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(23): warning CS0108: ‘dati_donatore.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è intenziona
le, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\ins_donatore.aspx.cs(26): warning CS0108: ‘bancaOcchi.ins_donatore.PDFExportPath’ nasconde il membro ereditato ‘PageSuper.PDFExportPath’. Se ciò è i
ntenzionale, utilizzare la parola chiave new. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(276): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(339): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\index.aspx.cs(123): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metapro
j]
c:\inetpub\wwwroot\bmembrana\dati_accettazione.aspx.cs(180): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembran
a_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\assenso.aspx.cs(432): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metap
roj]
c:\inetpub\wwwroot\bmembrana\assenso.aspx.cs(630): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metap
roj]
c:\inetpub\wwwroot\bmembrana\assenso.aspx.cs(640): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metap
roj]
c:\inetpub\wwwroot\bmembrana\assenso.aspx.cs(676): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metap
roj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(96): warning CS0168: La variabile ‘e’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.m
etaproj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(124): warning CS0168: La variabile ‘e’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(141): warning CS0168: La variabile ‘e’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(158): warning CS0168: La variabile ‘e’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(174): warning CS0168: La variabile ‘e’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\dati_donatore.aspx.cs(301): warning CS0168: La variabile ‘e’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\ins_donatore.aspx.cs(681): warning CS0168: La variabile ‘ex’ è dichiarata ma non è mai stata utilizzata. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(28): warning CS0169: Il campo ‘bancaOcchi.profilazione.id_op’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.m
etaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(29): warning CS0169: Il campo ‘bancaOcchi.profilazione.file_dest’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_
1_.metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(32): warning CS0414: Il campo ‘bancaOcchi.profilazione.ricercaUltimo’ è assegnato, ma il relativo valore non è mai utilizzato [
C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(33): warning CS0414: Il campo ‘bancaOcchi.profilazione.isAdmin’ è assegnato, ma il relativo valore non è mai utilizzato [C:\ine
tpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(35): warning CS0414: Il campo ‘bancaOcchi.profilazione.con’ è assegnato, ma il relativo valore non è mai utilizzato [C:\inetpub
\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\profilazione.aspx.cs(36): warning CS0169: Il campo ‘bancaOcchi.profilazione.sqlcon’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\cerca_sclera.aspx.cs(25): warning CS0414: Il campo ‘bancaOcchi.cerca_sclera.file_dest’ è assegnato, ma il relativo valore non è mai utilizzato [C:\i
netpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_lenticolo.aspx.cs(19): warning CS0649: Impossibile assegnare un valore diverso al campo ‘dati_lenticolo.dbAccess’. Il valore predefinito è null
. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_lenticolo.aspx.cs(21): warning CS0169: Il campo ‘dati_lenticolo.log’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_lenticolo.aspx.cs(23): warning CS0169: Il campo ‘dati_lenticolo.PDFExportPath’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.
metaproj]
c:\inetpub\wwwroot\bmembrana\trace.aspx.cs(19): warning CS0169: Il campo ‘trace.id_op’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\trace.aspx.cs(20): warning CS0169: Il campo ‘trace.file_dest’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_sclera.aspx.cs(19): warning CS0649: Impossibile assegnare un valore diverso al campo ‘dati_sclera.dbAccess’. Il valore predefinito è null. [C:
inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_sclera.aspx.cs(21): warning CS0169: Il campo ‘dati_sclera.log’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_sclera.aspx.cs(23): warning CS0169: Il campo ‘dati_sclera.PDFExportPath’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metapr
oj]
c:\inetpub\wwwroot\bmembrana\dati_accettazione.aspx.cs(23): warning CS0649: Impossibile assegnare un valore diverso al campo ‘dati_accettazione.PDFExportPath’. Il valore predefi
nito è null. [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\dati_cornea.aspx.cs(23): warning CS0169: Il campo ‘dati_cornea.PDFExportPath’ non è mai utilizzato [C:\inetpub\wwwroot\bmembrana\bmembrana_1_.metapr
oj]
c:\inetpub\wwwroot\bmembrana\cerca_cornea.aspx.cs(25): warning CS0414: Il campo ‘bancaOcchi.cerca_cornea.file_dest’ è assegnato, ma il relativo valore non è mai utilizzato [C:\i
netpub\wwwroot\bmembrana\bmembrana_1_.metaproj]
c:\inetpub\wwwroot\bmembrana\assenso.aspx.cs(25): warning CS0649: Impossibile assegnare un valore diverso al campo ‘assenso.PDFExportPath’. Il valore predefinito è null. [C:\ine
tpub\wwwroot\bmembrana\bmembrana_1_.metaproj]

all files aspx is ignored

From the log, it looks like the sonar analyzers are not being run. Could you please answer the following couple of questions?

  • are you running are 3 commands from the same folder?
  • could you please share the .sonarqube\conf\SonarQubeAnalysisConfig.xml and the .sonarqube\out\sonar-project.properties files ? (attach them to your answer or send me a private message on this forum)
<?xml version="1.0" encoding="utf-8" ?>
<!--
  This file defines properties which would be understood by the SonarQube Scanner for MSBuild, if not overridden (see below)
  By default the SonarScanner.MSBuild.exe picks-up a file named SonarQube.Analysis.xml in the folder it
  is located (if it exists). It is possible to use another properties file by using the /s:filePath.xml flag

  The overriding strategy of property values is the following:
  - A project-specific property defined in the MSBuild *.*proj file (corresponding to a SonarQube module) can override:
  - A property defined in the command line (/d:propertyName=value) has which can override:
  - A property defined in the SonarQube.Analysis.xml configuration file [this file] which can override:
  - A property defined in the SonarQube User Interface at project level which can override:
  - A property defined in the SonarQube User Interface at global level which can't override anything.

  Note that the following properties cannot be set through an MSBuild project file or an SonarQube.Analysis.xml file:
  sonar.projectName, sonar.projectKey, sonar.projectVersion
  The following flags need to be used to set their value: /n:[SonarQube Project Name] /k:[SonarQube Project Key] /v:[SonarQube Project Version]

-->
<SonarQubeAnalysisProperties  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">


  <Property Name="sonar.host.url"><LOCAL_URL_REDACTED></Property>

 <Property Name="sonar.login"><REDACTED></Property>
<!--
 
  <Property Name="sonar.password"></Property>
  -->

  <!-- Required only for versions of SonarQube prior to 5.2 -->
  <!--
  <Property Name="sonar.jdbc.url">jdbc:jtds:sqlserver://mySqlServer/sonar;instance=SQLEXPRESS;SelectMethod=Cursor</Property>
  <Property Name="sonar.jdbc.username">sonar</Property>
  <Property Name="sonar.jdbc.password">sonar</Property>
  -->

</SonarQubeAnalysisProperties>
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here

#----- Default SonarQube server
#sonar.host.url=http://localhost:9000

#----- Default source code encoding
sonar.sourceEncoding=UTF-8

i run command from cmd of windows in C:\sonar-ms46

I think there is a bug, when it finishes analyzing the source
hangs or jumps to the connected project and sends only the last connected project

Are you manually supplying a sonar-project.properties file?

The Scanner for MSBuild will generate one at %PROJECT_PATH%\.sonarqube\out\sonar-project.properties. What’s in that file?

if remove connected project have this error
but in vstudio 2015 i’ve compiled all
Generating SonarQube project properties file to c:\sonar-ms46\.sonarqube\out\sonar-project.properties

The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 and 15.0 are supported
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
Writing processing summary to c:\sonar-ms46\.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
17:34:57.566  Post-processing failed. Exit code: 1
<?xml version="1.0" encoding="utf-8"?>
<AnalysisConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">
  <SonarConfigDir>c:\sonar-ms46\.sonarqube\conf</SonarConfigDir>
  <SonarOutputDir>c:\sonar-ms46\.sonarqube\out</SonarOutputDir>
  <SonarBinDir>c:\sonar-ms46\.sonarqube\bin</SonarBinDir>
  <SonarScannerWorkingDirectory>c:\sonar-ms46</SonarScannerWorkingDirectory>
  <HasBeginStepCommandLineCredentials>false</HasBeginStepCommandLineCredentials>
  <SonarQubeHostUrl>http://172.18.0.3:9000</SonarQubeHostUrl>
  <SonarQubeVersion>7.7.0.23042</SonarQubeVersion>
  <SonarProjectKey>membrana_amniotica</SonarProjectKey>
  <AdditionalConfig>
    <ConfigSetting Id="BuildUri" />
    <ConfigSetting Id="TfsUri" />
    <ConfigSetting Id="settings.file.path" Value="C:\sonar-ms46\SonarQube.Analysis.xml" />
  </AdditionalConfig>
  <ServerSettings>
    <Property Name="sonaranalyzer-cs.nuget.packageVersion">7.15.0.8572</Property>
    <Property Name="sonar.cs.ignoreHeaderComments">true</Property>
    <Property Name="sonar.typescript.file.suffixes">.ts,.tsx</Property>
    <Property Name="sonar.python.coverage.reportPaths">coverage-reports/*coverage-*.xml</Property>
    <Property Name="sonar.javascript.jQueryObjectAliases">$, jQuery</Property>
    <Property Name="sonaranalyzer-vbnet.nuget.packageVersion">7.11.0.8083</Property>
    <Property Name="sonar.go.file.suffixes">.go</Property>
    <Property Name="email.fromName">SonarQube</Property>
    <Property Name="sonar.python.xunit.skipDetails">false</Property>
    <Property Name="sonar.dbcleaner.weeksBeforeKeepingOnlyAnalysesWithVersion">104</Property>
    <Property Name="sonar.cs.fxcop.fxCopCmdPath">C:/Program Files (x86)/Microsoft Visual Studio 12.0/Team Tools/Static Analysis Tools/FxCop/FxCopCmd.exe</Property>
    <Property Name="sonar.go.exclusions">**/vendor/**</Property>
    <Property Name="sonar.forceAuthentication">false</Property>
    <Property Name="sonar.notifications.delay">60</Property>
    <Property Name="sonar.vbnet.roslyn.ignoreIssues">false</Property>
    <Property Name="sonar.cs.fxcop.aspnet">false</Property>
    <Property Name="sonar.flex.file.suffixes">as</Property>
    <Property Name="sonar.ruby.file.suffixes">.rb</Property>
    <Property Name="sonaranalyzer-cs.ruleNamespace">SonarAnalyzer.CSharp</Property>
    <Property Name="sonar.cs.analyzeGeneratedCode">false</Property>
    <Property Name="sonar.python.xunit.reportPath">xunit-reports/xunit-result-*.xml</Property>
    <Property Name="sonar.builtInQualityProfiles.disableNotificationOnUpdate">false</Property>
    <Property Name="sonar.javascript.globals">angular,goog,google,OpenLayers,d3,dojo,dojox,dijit,Backbone,moment,casper</Property>
    <Property Name="sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay">24</Property>
    <Property Name="sonar.javascript.exclusions">**/node_modules/**,**/bower_components/**</Property>
    <Property Name="sonar.css.file.suffixes">.css,.less,.scss</Property>
    <Property Name="sonar.java.failOnException">false</Property>
    <Property Name="sonar.organizations.createPersonalOrg">false</Property>
    <Property Name="sonar.jacoco.reportPaths">target/jacoco.exec, target/jacoco-it.exec</Property>
    <Property Name="sonar.html.file.suffixes">.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,.asp</Property>
    <Property Name="sonaranalyzer-vbnet.nuget.packageId">SonarAnalyzer.VisualBasic</Property>
    <Property Name="sonar.cpd.cross_project">false</Property>
    <Property Name="email.from">noreply@nowhere</Property>
    <Property Name="sonaranalyzer-vbnet.pluginVersion">7.11.0.8083</Property>
    <Property Name="sonar.vbnet.ignoreHeaderComments">true</Property>
    <Property Name="sonar.typescript.node">node</Property>
    <Property Name="sonar.vbnet.fxcop.fxCopCmdPath">C:/Program Files (x86)/Microsoft Visual Studio 12.0/Team Tools/Static Analysis Tools/FxCop/FxCopCmd.exe</Property>
    <Property Name="sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByWeek">4</Property>
    <Property Name="sonar.leak.period">previous_version</Property>
    <Property Name="sonaranalyzer-vbnet.analyzerId">SonarAnalyzer.VisualBasic</Property>
    <Property Name="email.prefix">[SONARQUBE]</Property>
    <Property Name="sonar.scala.file.suffixes">.scala</Property>
    <Property Name="sonar.cs.roslyn.ignoreIssues">false</Property>
    <Property Name="sonar.vbnet.fxcop.timeoutMinutes">10</Property>
    <Property Name="sonaranalyzer-cs.pluginKey">csharp</Property>
    <Property Name="sonaranalyzer-vbnet.ruleNamespace">SonarAnalyzer.VisualBasic</Property>
    <Property Name="sonar.javascript.ignoreHeaderComments">true</Property>
    <Property Name="sonar.dbcleaner.daysBeforeDeletingClosedIssues">30</Property>
    <Property Name="sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByMonth">52</Property>
    <Property Name="sonar.lf.gravatarServerUrl">https://secure.gravatar.com/avatar/{EMAIL_MD5}.jpg?s={SIZE}&amp;d=identicon</Property>
    <Property Name="sonar.cs.fxcop.timeoutMinutes">10</Property>
    <Property Name="sonar.ruby.coverage.reportPaths">coverage/.resultset.json</Property>
    <Property Name="sonar.vbnet.fxcop.aspnet">false</Property>
    <Property Name="sonaranalyzer-cs.staticResourceName">SonarAnalyzer-7.15.0.8572.zip</Property>
    <Property Name="sonar.notifications.runningDelayBeforeReportingStatus">600</Property>
    <Property Name="sonar.jsp.file.suffixes">.jsp,.jspf,.jspx</Property>
    <Property Name="sonaranalyzer-cs.nuget.packageId">SonarAnalyzer.CSharp</Property>
    <Property Name="sonar.javascript.environments">amd, applescript, atomtest, browser, commonjs, couch, embertest, flow, greasemonkey, jasmine, jest, jquery, meteor, mocha, mongo, nashorn, node, phantomjs, prototypejs, protractor, qunit, rhino, serviceworker, shared-node-browser, shelljs, webextensions, worker, wsh, yui</Property>
    <Property Name="sonar.authenticator.downcase">false</Property>
    <Property Name="sonar.scm.disabled">false</Property>
    <Property Name="sonar.typescript.exclusions">**/node_modules/**,**/bower_components/**</Property>
    <Property Name="sonar.vbnet.file.suffixes">.vb</Property>
    <Property Name="sonaranalyzer-cs.analyzerId">SonarAnalyzer.CSharp</Property>
    <Property Name="sonar.organizations.anyoneCanCreate">false</Property>
    <Property Name="sonar.technicalDebt.ratingGrid">0.05,0.1,0.2,0.5</Property>
    <Property Name="sonar.technicalDebt.developmentCost">30</Property>
    <Property Name="sonar.lf.enableGravatar">false</Property>
    <Property Name="sonar.python.file.suffixes">py</Property>
    <Property Name="sonaranalyzer-cs.pluginVersion">7.15.0.8572</Property>
    <Property Name="sonar.cs.file.suffixes">.cs,.aspx.cs</Property>
    <Property Name="sonar.javascript.file.suffixes">.js,.jsx,.vue</Property>
    <Property Name="sonaranalyzer-vbnet.staticResourceName">SonarAnalyzer-7.11.0.8083.zip</Property>
    <Property Name="sonar.java.file.suffixes">.java,.jav</Property>
    <Property Name="sonar.kotlin.file.suffixes">.kt</Property>
    <Property Name="sonar.php.file.suffixes">php,php3,php4,php5,phtml,inc</Property>
    <Property Name="sonar.xml.file.suffixes">.xml,.xsd,.xsl</Property>
    <Property Name="sonar.dbcleaner.weeksBeforeDeletingAllSnapshots">260</Property>
    <Property Name="sonaranalyzer-vbnet.pluginKey">vbnet</Property>
    <Property Name="sonar.java.collectAnalysisErrors">false</Property>
    <Property Name="sonar.updatecenter.url">https://update.sonarsource.org/update-center.properties</Property>
    <Property Name="sonar.core.id">664901E1-AWqNyp9cTzdT3CmQmuih</Property>
    <Property Name="sonar.core.startTime">08/07/2019 12:44:49</Property>
  </ServerSettings>
  <LocalSettings>
    <Property Name="sonar.verbose">true</Property>
  </LocalSettings>
  <AnalyzersSettings>
    <AnalyzerSettings>
      <Language>cs</Language>
      <RuleSetFilePath>c:\sonar-ms46\.sonarqube\conf\SonarQubeRoslyn-cs.ruleset</RuleSetFilePath>
      <TestProjectRuleSetFilePath>c:\sonar-ms46\.sonarqube\conf\SonarQubeRoslyn-cs-test.ruleset</TestProjectRuleSetFilePath>
      <AnalyzerPlugins>
        <AnalyzerPlugin Key="csharp" Version="7.15.0.8572" StaticResourceName="SonarAnalyzer-7.15.0.8572.zip">
          <AssemblyPaths>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\0\Google.Protobuf.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.dll</Path>
          </AssemblyPaths>
        </AnalyzerPlugin>
        <AnalyzerPlugin Key="vbnet" Version="7.11.0.8083" StaticResourceName="SonarAnalyzer-7.11.0.8083.zip">
          <AssemblyPaths>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\1\Google.Protobuf.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.VisualBasic.dll</Path>
          </AssemblyPaths>
        </AnalyzerPlugin>
      </AnalyzerPlugins>
      <AdditionalFilePaths>
        <Path>c:\sonar-ms46\.sonarqube\conf\cs\SonarLint.xml</Path>
      </AdditionalFilePaths>
    </AnalyzerSettings>
    <AnalyzerSettings>
      <Language>vbnet</Language>
      <RuleSetFilePath>c:\sonar-ms46\.sonarqube\conf\SonarQubeRoslyn-vbnet.ruleset</RuleSetFilePath>
      <TestProjectRuleSetFilePath>c:\sonar-ms46\.sonarqube\conf\SonarQubeRoslyn-vbnet-test.ruleset</TestProjectRuleSetFilePath>
      <AnalyzerPlugins>
        <AnalyzerPlugin Key="csharp" Version="7.15.0.8572" StaticResourceName="SonarAnalyzer-7.15.0.8572.zip">
          <AssemblyPaths>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\0\Google.Protobuf.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.dll</Path>
          </AssemblyPaths>
        </AnalyzerPlugin>
        <AnalyzerPlugin Key="vbnet" Version="7.11.0.8083" StaticResourceName="SonarAnalyzer-7.11.0.8083.zip">
          <AssemblyPaths>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\1\Google.Protobuf.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.dll</Path>
            <Path>C:\Users\nturri\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.VisualBasic.dll</Path>
          </AssemblyPaths>
        </AnalyzerPlugin>
      </AnalyzerPlugins>
      <AdditionalFilePaths>
        <Path>c:\sonar-ms46\.sonarqube\conf\vbnet\SonarLint.xml</Path>
      </AdditionalFilePaths>
    </AnalyzerSettings>
  </AnalyzersSettings>
</AnalysisConfig>

Thanks for providing the SonarQubeAnalysisConfig.xml file

Can you also provide the sonar-project.properties file which is present, as I’ve mentioned above, in the .sonarqube\out folder?

From looking at the XML file you provided, your solution is in C:\inetpub\wwwroot\bmembrana\bmembrana.sln, but you are running the analysis from c:\sonar-ms46\ (at least some steps of it).

During the analysis, the Scanner for MSBuild and also our analyzer generate important metadata files inside the .sonarqube folder. In your case, this folder should be generated here: C:\inetpub\wwwroot\bmembrana\.sonarqube.

You need to run all 3 commands from this folder: C:\inetpub\wwwroot\bmembrana

Writing processing summary to c:\sonar-ms46.sonarqube\out\ProjectInfo.log

Product projects

Test projects

Invalid projects

{none}

Skipped projects

{none}

Excluded projects

{none}

same problem in i run 3 cmd in C:\inetpub\wwwroot\bmembrana

set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
C:\sonar-ms46\SonarScanner.MSBuild.exe begin /k:“membrana_amniotica” /d:sonar.verbose=true

“C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe” bmembrana.sln /t:Rebuild /p:Configuration=Debug /p:Platform=“Any CPU”

Avvisi: 87
Errori: 0

Tempo trascorso 00:00:04.83

C:\inetpub\wwwroot\bmembrana>C:\sonar-ms46\SonarScanner.MSBuild.exe end

SonarScanner for MSBuild 4.6.2
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
18:05:24.317  18:05:24.311  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.318  18:05:24.312  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.318  18:05:24.312  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.319  18:05:24.312  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.319  18:05:24.312  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.319  18:05:24.313  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.32  18:05:24.313  Uninstalling target: C:\Users\nturri\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore\SonarQube.Integration.ImportBefore.targets
18:05:24.32  18:05:24.317  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
18:05:24.321  Loading the SonarQube analysis config from C:\inetpub\wwwroot\bmembrana\.sonarqube\conf\SonarQubeAnalysisConfig.xml
18:05:24.321  Not running under TeamBuild
18:05:24.322  Analysis base directory: C:\inetpub\wwwroot\bmembrana\.sonarqube
Build directory:
Bin directory: C:\inetpub\wwwroot\bmembrana\.sonarqube\bin
Config directory: C:\inetpub\wwwroot\bmembrana\.sonarqube\conf
Output directory: C:\inetpub\wwwroot\bmembrana\.sonarqube\out
Config file: C:\inetpub\wwwroot\bmembrana\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Generating SonarQube project properties file to C:\inetpub\wwwroot\bmembrana\.sonarqube\out\sonar-project.properties
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 and 15.0 are supported
  3. The begin, build and end steps have not all been launched from the same folder
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
Writing processing summary to C:\inetpub\wwwroot\bmembrana\.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
18:05:24.344  Post-processing failed. Exit code: 1

This can sometimes happen if you run an analysis just half-way and you don’t clean the environment. For example, if you run twice the Begin step + Build.

If you delete the .sonarqube folder and try again the steps one after another, the end step still fails?