MSBUILD : error MSB1009: Project file does not exist

Issue #5 closed
Mickael Dance created an issue

Hello,

We are trying to use the TechCognia TSql plugin on one of our project, build from TFS Our TFS is 2015, and SonarCube 6.2 Our project is a basic console application, with a folder with some table, procedures, and views in .sql We build the project with one build step: Perform a SonarQube analysis (SonarQube Scanner CLI) I have follow all the step describe here https://bitbucket.org/TechCognia/plugins/wiki/TechCognia%20TSql%20SonarQube%20Plugin I first build the project only with the console project, without SQL folder. Steps run successfully. But once I add the SQL folder, I've an error during the Build "Perform a SonarQube analysis" ("Get Sources" & "Post Job Cleanup" are OK):

2017-04-25T14:04:55.4783134Z INFO: MSBUILD : error MSB1009: Project file does not exist.
2017-04-25T14:04:55.4783134Z INFO: Switch: c:\TechCognia\SqlCodeGuard.msbuild
2017-04-25T14:04:55.4783134Z INFO: ------------------------------------------------------------------------
2017-04-25T14:04:55.4783134Z INFO: EXECUTION FAILURE
2017-04-25T14:04:55.4783134Z INFO: ------------------------------------------------------------------------
2017-04-25T14:04:55.4783134Z INFO: Total time: 7.125s
2017-04-25T14:04:55.5877070Z INFO: Final Memory: 44M/141M
2017-04-25T14:04:55.5877070Z INFO: ------------------------------------------------------------------------
2017-04-25T14:04:55.5877070Z ##[error]ERROR: Error during SonarQube Scanner execution
2017-04-25T14:04:55.5877070Z ##[error]org.sonar.api.utils.command.CommandException: The execution of "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe c:\TechCognia\SqlCodeGuard.msbuild" failed and returned 1 as exit code.  [command: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "c:\TechCognia\SqlCodeGuard.msbuild" /p:SourcePath=D:/agent1/_work/1/s/ConsoleApplication1/SQL/REF_Account.sql /p:Rules="PE007;ST004;PE008;ST003;PE009;ST006;ST005;ST008;ST007;ST009;PE001;PE002;PE003;PE004;PE005;ST002;PE006;ST001;EI029;EI028;EI027;EI026;EI025;EI024;EI023;EI022;EI021;EI020;PE018;PE019;PE010;PE011;PE012;PE013;PE014;PE015;PE016;PE017;EI019;EI018;EI017;EI016;EI015;EI014;EI013;EI012;EI011;EI010;BP007;BP006;BP005;BP004;BP003;BP002;BP001;EI009;EI008;EI007;BP009;EI006;BP008;EI005;EI004;EI003;EI002;EI001;BP010;BP018;BP017;BP016;BP015;ST011;BP014;ST010;BP013;ST013;BP012;ST012;BP011;CGUNP;SC001;SC003;SC002;SC004;DEP026;DEP025;DEP024;DEP023;DEP028;DEP027;DEP022;DEP021;DEP020;DEP015;DEP014;DEP013;DEP012;DEP019;DEP018;DEP017;DEP016;DEP011;DEP010;DEP009;DEP004;DEP003;DEP002;DEP001;DEP008;DEP007;DEP006;DEP005;CGTIME;MI007;MI006;MI005;MI004;MI003;MI002;MI001" /p:OutputPath=D:\agent1\_work\1\s\.sonar\sqlcodeguard_report.xml]
2017-04-25T14:04:55.5877070Z ##[error]at com.techcognia.plugins.tsql.D.A(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at com.techcognia.plugins.tsql.F.A(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at com.techcognia.plugins.tsql.F.E(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at com.techcognia.plugins.tsql.F.execute(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
2017-04-25T14:04:55.5877070Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2017-04-25T14:04:55.5877070Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at java.lang.reflect.Method.invoke(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2017-04-25T14:04:55.5877070Z ##[error]at com.sun.proxy.$Proxy0.execute(Unknown Source)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
2017-04-25T14:04:55.5877070Z ##[error]at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2017-04-25T14:04:55.5877070Z ##[error]ERROR:
2017-04-25T14:04:55.5877070Z ##[error]ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
2017-04-25T14:04:55.5877070Z ##[error]System.Exception: Unexpected exit code received from batch file: 1
2017-04-25T14:04:55.5877070Z ##[debug]Processed: ##vso[task.logissue type=error;]System.Exception: Unexpected exit code received from batch file: 1
2017-04-25T14:04:55.5877070Z    at Microsoft.TeamFoundation.DistributedTask.Task.Internal.InvokeBatchScriptCmdlet.ProcessRecord()
2017-04-25T14:04:55.5877070Z    at System.Management.Automation.CommandProcessor.ProcessRecord()
2017-04-25T14:04:55.6033153Z ##[error]PowerShell script completed with 1 errors.

Does anybody have an idea of the problem? Thanks a lot in advance

Comments (3)

  1. Team TechCognia repo owner

    Hi Mickael,

    Please can you confirm if you have a file @c:\TechCognia\SqlCodeGuard.msbuild ?

  2. Mickael Dance reporter

    Hello,

    Yes I confirm, this file is present on the TFS Web server where TechCognia&SonarCube are installed. Our Build server is different, should it be installed also on the build server?

  3. Log in to comment