Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Building a MSBuild project #1750

tms_sooraj ·
I'm trying to build a MSBuild project using QB 4. I'd updated the MSBuild Plugin configuration in "Plugin Management", so that MSBuild.exe is located automatically and need not be mentioned in build step. On the build step, for the field "Project File", I'd put the non-absolute path of the project file (example: One_DD_Comp/One_DD_Component/01Dev/Build/TestBuild.prj) so that the project file is located in this location relative to the workspace.

My workspace: D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution
Actual Project file location: D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution\One_DD_Comp\One_DD_Component\01Dev\Build.

Therefore, I'd provided the project file location as One_DD_Comp/One_DD_Component/01Dev/Build/TestBuild.prj. I'd left the "Working Directory" field to be empty, since MSBuild.exe location is already available in plugin management.

Error scenario:
When the build is executed, QB reports that MSBuild cannot find the project file.

Error Log:
14:05:58,080 [master>Build@VCTMSDASV28:10202] INFO - Running step...
14:05:58,440 [master>Build@VCTMSDASV28:10202] DEBUG - Executing command: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /t:Build /noconsolelogger "/l:QBLogger,D:\Program Files\buildagent_v2\temp\PMEase.QuickBuild.MSBuild.Logger.dll;v=detailed" One_DD_Comp/One_DD_Component/01Dev/Build/TestBuild.prj
14:05:58,440 [master>Build@VCTMSDASV28:10202] DEBUG - Command working directory: D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution\One_DD_Comp\One_DD_Component\01Dev\Build
14:05:58,612 [master>Build@VCTMSDASV28:10202] ERROR - MSBUILD : error MSB1009: Project file does not exist.
14:05:58,612 [master>Build@VCTMSDASV28:10202] INFO - Switch: One_DD_Comp/One_DD_Component/01Dev/Build/TestBuild.prj
14:05:58,643 [master>Build@VCTMSDASV28:10202] INFO - Executing post-execute action...
14:05:58,643 [master>Build@VCTMSDASV28:10202] ERROR - Step 'master>Build' is failed.
com.pmease.quickbuild.QuickbuildException: Executing below MSBuild command failed (1 errors, 0 warnings):
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /t:Build /noconsolelogger "/l:QBLogger,D:\Program Files\buildagent_v2\temp\PMEase.QuickBuild.MSBuild.Logger.dll;v=detailed" One_DD_Comp/One_DD_Component/01Dev/Build/TestBuild.prj
See detailed errors below:
MSBUILD : error MSB1009: Project file does not exist.

Observation:
1. As seen in the log, the command working directory is picked up as project file location "D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution\One_DD_Comp\One_DD_Component\01Dev\Build", which is correct.
2. However while command gets executed the project file location is not taken as absolute path and is treated non-absolute i.e. One_DD_Comp/One_DD_Component/01Dev/Build/TestBuild.prj. Therefore, the project file is not located.

Let us know, how the project file location can be configured.
  • replies 3
  • views 6095
  • stars 0
steveluo ADMIN ·
Hi,

I tried in my test machine and didn't find any error. Please make sure your project file is really existed and run the command on your console under the directory: D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution to see what's the problem.

Also, you may change the project file to absolute path, that is, in your example is:
D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution\One_DD_Comp\One_DD_Component\01Dev\Build\TestBuild.prj
and run the build.
tms_sooraj ·
1. The project file is very much available in the location D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution\One_DD_Comp\One_DD_Component\01Dev\Build.

2. If I run the build command from the directory D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution, it works fine. But, if you can see from the logs, the command working directory is assumed as D:\Program Files\buildagent_v2\workspace\TMS\One Dealer Daily\1DD_Solution\One_DD_Comp\One_DD_Component\01Dev\Build\. If the build command is executed from this directory, it cannot find the project file. If the "Working DIrectory" (in Build step) is left empty, QB will assume the working directory to be the project file location. Here, it identifies the project file location properly and tries to execute from the D:\...\One_DD_Comp\One_DD_Component\01Dev\Build\ directory. However the build command fails.

3. Giving the absolute path of project file location will work fine. But, we do not want to give the absolute path and prefer to keep it non-absolute, since our workspace directory will be different for each node.
steveluo ADMIN ·
Thank you for detailed description. It is confirmed to be a bug now:

http://track.pmease.com/browse/QB-1215

I have created a patch release, please upgrade to QB 4.0.28.