Reputation: 229
I have a simple Solution tree:
Repository: DFW-SPF-Website |-- Solution: DFWSPFWebsite |-- |-- Project: DFWSPFWebsite
In my previous post I explained the contortions I had to go through to get VSTS to find my NuGet Packages. It took a while to lead its MSBuild process to even find the .sln file. Now MSBuild can't find the Project file. Really?!
After countless incarnations, my current build settings are:
Solution: $(build.sourcesDirectory)/DFWSPFWebsite/DFWSPFWebsite.sln
MSBuild Arguments: /p:ProjectFile=$(build.sourcesDirectory)\DFWSPFWebsite\DFWSPFWebsite\DFWSPFWebsite.csproj
Platform: $(BuildPlatform) Configuration: $(BuildConfiguration) Clean: true VS Version: 2015/2017/Latest (tried them all) Control Options: Enabled
I can't get past the MSBuild error of:
"C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "D:\a\1\s\DFWSPFWebsite\DFWSPFWebsite.sln" /nologo /nr:false /t:"Clean" /dl:CentralLogger,"D:\a_tasks\VSBuild_abc-xyz\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=abc-xyz|SolutionDir=D:\a\1\s\DFWSPFWebsite"*ForwardingLogger,"D:\a_tasks\VSBuild_71abc-xyz\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:ProjectFile=D:\a\1\s\DFWSPFWebsite\DFWSPFWebsite.csproj /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="14.0" /p:_MSDeployUserAgent="VSTS_abc-xyz_build_2_38" MSBUILD : error MSB1009: Project file does not exist. Switch: D:\a\1\s\DFWSPFWebsite\DFWSPFWebsite.sln Process 'msbuild.exe' exited with code '1'. "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "D:\a\1\s\DFWSPFWebsite\DFWSPFWebsite.sln" /nologo /nr:false /dl:CentralLogger,"D:\a_tasks\VSBuild_71abc-xyz\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=abc-xyz|SolutionDir=D:\a\1\s\DFWSPFWebsite"*ForwardingLogger,"D:\a_tasks\VSBuild_71abc-xyz\1.113.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:ProjectFile=D:\a\1\s\DFWSPFWebsite\DFWSPFWebsite.csproj /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="14.0" /p:_MSDeployUserAgent="VSTS_14abc-xyz_build_2_38" MSBUILD : error MSB1009: Project file does not exist. Switch: D:\a\1\s\DFWSPFWebsite\DFWSPFWebsite.sln Process 'msbuild.exe' exited with code '1'.
I never thought I'd miss my XAML deployment so much.
Upvotes: 2
Views: 12019
Reputation: 229
I GOT A CLEAN BUILD!!! Yes, ellipses are good – I was using the pre-release UI. I also had to relocate a couple of external referenced dlls into a dll folder under the sln. And, I had to remove the <Target Name="EnsureBclBuildImported"…/>
, <Import Project="..\packages\Microsoft.Bcl.Build…/>
and <Target Name="EnsureNuGetPackageBuildImports"…/>
nodes from the csproj file. See [MSDN] (https://learn.microsoft.com/en-us/nuget/consume-packages/package-restore#migrating-to-automatic-restore) Because I’m not supposed to on SO, I will not send my incalculable appreciation to @Marina. :*
Upvotes: 0
Reputation: 38096
First, please build your solution in VS 2015 to make sure it can build successfully. Then you can build in VSTS.
Since you only want to build one solution, so you can select DFWSPFWebsite.sln
from …
button both for nuget installer task and visual studio build task.
Nugget installer:
Visual studio build:
Upvotes: -1