0
votes

I am receiving the above error when trying to run my build. I have looked at the other answers to this question and have ensured that the project does build in VS2019, that my solution paths are correct and that I have checked the clean box in my Visual Studio Build Task. I'm at a loss and was hoping that someone will see something I am missing. Here is the error log I receive:

2019-12-05T16:51:51.4631828Z ##[section]Starting: Build solution CONSurvey

2019-12-05T16:51:51.4635684Z ============================================================================== 2019-12-05T16:51:51.4635853Z Task : Visual Studio build

2019-12-05T16:51:51.4636005Z Description : Build with MSBuild and set the Visual Studio version property

2019-12-05T16:51:51.4636138Z Version : 1.151.2

2019-12-05T16:51:51.4636254Z Author : Microsoft Corporation

2019-12-05T16:51:51.4636405Z Help : More Information

2019-12-05T16:51:51.4636579Z

2019-12-05T16:51:53.3057099Z

[command]"E:\tfs-agents\DHSS_VSTS_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\vswhere.exe" -version [16.0,17.0) -latest -format json

2019-12-05T16:51:53.6381113Z ##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" "E:\tfs-agents\DHSS_VSTS_work\233\s\CONSurvey.sln" /nologo /nr:false /t:"Clean" /fl /flp:"logfile=E:\tfs-agents\DHSS_VSTS_work\233\s\CONSurvey.sln.log;verbosity=diagnostic" /dl:CentralLogger,"E:\tfs-agents\DHSS_VSTS_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=99b4b9b2-7001-494c-962a-5d5532ebc121|SolutionDir=E:\tfs-agents\DHSS_VSTS_work\233\s"*ForwardingLogger,"E:\tfs-agents\DHSS_VSTS_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false /p:DeployOnBuild=true;OutDir="E:\tfs-agents\DHSS_VSTS_work\233\a" /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="16.0" /p:_MSDeployUserAgent="VSTS_15c81635-e2c4-41a0-95f6-2d0b2f6cbc4d_build_129_0"

2019-12-05T16:51:53.7934752Z MSBUILD : error MSB1009: Project file does not exist.

2019-12-05T16:51:53.7973651Z Switch: E:\tfs-agents\DHSS_VSTS_work\233\s\CONSurvey.sln

2019-12-05T16:51:53.9286545Z ##[error]Process 'msbuild.exe' exited with code '1'.

2019-12-05T16:51:53.9661712Z ##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" "E:\tfs-agents\DHSS_VSTS_work\233\s\CONSurvey.sln" /nologo /nr:false /fl /flp:"logfile=E:\tfs-agents\DHSS_VSTS_work\233\s\CONSurvey.sln.log;verbosity=diagnostic" /dl:CentralLogger,"E:\tfs-agents\DHSS_VSTS_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=1029b97a-fe32-4d73-b976-928576336049|SolutionDir=E:\tfs-agents\DHSS_VSTS_work\233\s"*ForwardingLogger,"E:\tfs-agents\DHSS_VSTS_work_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false /p:DeployOnBuild=true;OutDir="E:\tfs-agents\DHSS_VSTS_work\233\a" /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="16.0" /p:_MSDeployUserAgent="VSTS_15c81635-e2c4-41a0-95f6-2d0b2f6cbc4d_build_129_0"

2019-12-05T16:51:54.1134908Z MSBUILD : error MSB1009: Project file does not exist.

2019-12-05T16:51:54.1135166Z Switch: E:\tfs-agents\DHSS_VSTS_work\233\s\CONSurvey.sln

2019-12-05T16:51:54.1648429Z ##[error]Process 'msbuild.exe' exited with code '1'.

2019-12-05T16:51:54.2165236Z ##[section]Finishing: Build solution CONSurvey

Edit: Yes, the solution file is there. It is not missing.

1
No one can help you solve this. The error message is saying there's a missing file. It's up to you to confirm that the source code structure you're expecting to be present is actually present. - Daniel Mann
@DanielMann The solution file is there. If it was missing I wouldn't have asked the question. - comfortablyNumb
What about the project files? The rest of the source code? Is it present and organized in the structure you're expecting it to be? - Daniel Mann
Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance. - Leo Liu-MSFT

1 Answers

0
votes

MSBUILD: error MSB1009: Project file does not exist on Azure Devops TFS

The cause of this issue usually comes from two aspects, one is the issue with the build definition settings, and the other is the issue of your project/solution itself.

For the build definition settings, you need to check if you omitted the actual solution file in the Solution text box instead of a solution path. For example,

The following shows just the folder path and this setting produces the error:

enter image description here

This is the correct setting with the solution file to build:

enter image description here

This setting has been a source of confusion due to the heading on the dialog to select the Path and not say select the Path to the Solution file.

For the ssue of your project/solution itself, since we do not have your solution/projects, we could not point directly to the issue. But you could build solution in the local machine without Azure devops, then check if you still have this issue.

Note: If you can build it success in you local machine, make sure you have check all required files to the source control.

Hope this helps.