TFS 2017 build фактически не выполняет сборку - PullRequest
0 голосов
/ 24 мая 2018

У нас есть сборка TFS 2017, которую я только что перенес (воссоздал) в другой проект, и один из моих файлов .sln не создается.Папка bin \ release пуста после этапа сборки.Вот команда, выполняемая на этапе сборки:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\PGScannerService.sln" /nologo /nr:false /dl:CentralLogger,"C:\TFS2017_Builld_Agent2\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.119.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=|SolutionDir=C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService"*ForwardingLogger,"C:\TFS2017_Builld_Agent2\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.119.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"  /p:platform="x86" /p:configuration="Release" /p:_MSDeployUserAgent="TFS_e143528a-7a2f-41eb-b587-1d8ceb3e1fa8_build_136_8275"

И если я открою командную строку и выполню эту команду как есть, папка выпуска будет заполнена, как и ожидалось, но не через сборку TFS.Шаг сборки говорит о том, что он успешно завершен.Что здесь происходит?

Просто для полноты вот весь журнал сборки для этого .sln:

2018-05-24T17:49:22.9911639Z ##[section]Starting: Build solution PGScannerService.sln
2018-05-24T17:49:23.0161664Z ==============================================================================
2018-05-24T17:49:23.0161664Z Task         : MSBuild
2018-05-24T17:49:23.0171665Z Description  : Build with MSBuild
2018-05-24T17:49:23.0171665Z Version      : 1.119.0
2018-05-24T17:49:23.0171665Z Author       : Microsoft Corporation
2018-05-24T17:49:23.0171665Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613724)
2018-05-24T17:49:23.0171665Z ==============================================================================
2018-05-24T17:49:33.5172164Z ##[command]"C:\TFS2017_Builld_Agent2\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.119.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -latest -format json
2018-05-24T17:49:33.9122559Z ##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\PGScannerService.sln" /nologo /nr:false /dl:CentralLogger,"C:\TFS2017_Builld_Agent2\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.119.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=|SolutionDir=C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService"*ForwardingLogger,"C:\TFS2017_Builld_Agent2\_work\_tasks\MSBuild_c6c4c611-aa2e-4a33-b606-5eaba2196824\1.119.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"  /p:platform="x86" /p:configuration="Release" /p:_MSDeployUserAgent="TFS_e143528a-7a2f-41eb-b587-1d8ceb3e1fa8_build_136_8275"
2018-05-24T17:49:34.7263373Z Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
2018-05-24T17:49:34.8713518Z Build started 5/24/2018 10:49:34 AM.
2018-05-24T17:49:35.1863833Z Project "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\PGScannerService.sln" on node 1 (default targets).
2018-05-24T17:49:35.1873834Z ValidateSolutionConfiguration:
2018-05-24T17:49:35.1883835Z   Building solution configuration "Release|x86".
2018-05-24T17:49:35.4464093Z Project "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\PGScannerService.sln" (1) is building "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj" (2) on node 1 (default targets).
2018-05-24T17:49:35.4464093Z RestorePackages:
2018-05-24T17:49:35.4464093Z   "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\.nuget\NuGet.exe" install "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ "
2018-05-24T17:49:38.0566703Z   Restoring NuGet packages...
2018-05-24T17:49:38.0566703Z   To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the NuGet Package Manager node and uncheck 'Allow NuGet to download missing packages'.
2018-05-24T17:49:38.1916838Z   Feeds used:
2018-05-24T17:49:38.1916838Z     https://api.nuget.org/v3/index.json
2018-05-24T17:49:38.1916838Z     C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
2018-05-24T17:49:38.1926839Z   
2018-05-24T17:49:38.2006847Z   All packages listed in C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\packages.config are already installed.
2018-05-24T17:49:38.3426989Z PrepareForBuild:
2018-05-24T17:49:38.3426989Z   Creating directory "bin\x86\Release\".
2018-05-24T17:49:38.3476994Z   Creating directory "obj\x86\Release\".
2018-05-24T17:49:38.8487495Z CoreResGen:
2018-05-24T17:49:38.8497496Z   "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\resgen.exe" /useSourcePath /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /r:C:\Packages\Pacsgear.Debug.PacsgearLib.2.5.4\lib\net40\PacsgearLib.dll /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Deployment.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Drawing.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ServiceModel.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ServiceModel.Web.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /r:C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\TwainNet.dll /compile MainForm.resx,obj\x86\Release\PG.Scanner.Service.ScannerService.resources Properties\Resources.resx,obj\x86\Release\PG.Scanner.Service.Properties.Resources.resources
2018-05-24T17:49:38.8507497Z   Processing resource file "MainForm.resx" into "obj\x86\Release\PG.Scanner.Service.ScannerService.resources".
2018-05-24T17:49:38.8597506Z   Processing resource file "Properties\Resources.resx" into "obj\x86\Release\PG.Scanner.Service.Properties.Resources.resources".
2018-05-24T17:49:38.9377584Z CoreCompile:
2018-05-24T17:49:38.9387585Z   C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /unsafe+ /nowarn:1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /define:TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:C:\Packages\Pacsgear.Debug.PacsgearLib.2.5.4\lib\net40\PacsgearLib.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Deployment.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ServiceModel.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.ServiceModel.Web.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /reference:C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\TwainNet.dll /debug:pdbonly /filealign:512 /optimize+ /out:obj\x86\Release\PGScannerService.exe /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /resource:obj\x86\Release\PG.Scanner.Service.ScannerService.resources /resource:obj\x86\Release\PG.Scanner.Service.Properties.Resources.resources /target:winexe /utf8output MainForm.cs MainForm.Designer.cs Program.cs Properties\AssemblyInfo.cs ScannerApi.cs ScannerApiContract.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs "C:\TFS2017_Builld_Agent2\_work\_temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs"
2018-05-24T17:49:38.9797626Z   Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn
2018-05-24T17:49:39.2717918Z ##[warning]CorePlatform\ScannerService\ScannerService\MainForm.cs(205,30): Warning CS0168: The variable 'ex' is declared but never used
2018-05-24T17:49:39.2717918Z MainForm.cs(205,30): warning CS0168: The variable 'ex' is declared but never used [C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj]
2018-05-24T17:49:39.2717918Z ##[warning]CorePlatform\ScannerService\ScannerService\MainForm.cs(40,29): Warning CS0169: The field 'ScannerService.t' is never used
2018-05-24T17:49:39.2717918Z MainForm.cs(40,29): warning CS0169: The field 'ScannerService.t' is never used [C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj]
2018-05-24T17:49:39.2727919Z ##[warning]CorePlatform\ScannerService\ScannerService\MainForm.cs(25,23): Warning CS0414: The field 'ScannerService.MaxPaperHeightInInches' is assigned but its value is never used
2018-05-24T17:49:39.2727919Z MainForm.cs(25,23): warning CS0414: The field 'ScannerService.MaxPaperHeightInInches' is assigned but its value is never used [C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj]
2018-05-24T17:49:39.2727919Z _CopyFilesMarkedCopyLocal:
2018-05-24T17:49:39.2727919Z   Copying file from "C:\Packages\Pacsgear.Debug.PacsgearLib.2.5.4\lib\net40\PacsgearLib.dll" to "bin\x86\Release\PacsgearLib.dll".
2018-05-24T17:49:39.3017948Z   Copying file from "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\TwainNet.dll" to "bin\x86\Release\TwainNet.dll".
2018-05-24T17:49:39.3317978Z   Copying file from "C:\Packages\Pacsgear.Debug.PacsgearLib.2.5.4\lib\net40\PacsgearLib.pdb" to "bin\x86\Release\PacsgearLib.pdb".
2018-05-24T17:49:39.3367983Z   Creating "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\obj\x86\Release\ScannerApp.csproj.CopyComplete" because "AlwaysCreate" was specified.
2018-05-24T17:49:39.3417988Z _CopyAppConfigFile:
2018-05-24T17:49:39.3417988Z   Copying file from "App.config" to "bin\x86\Release\PGScannerService.exe.config".
2018-05-24T17:49:39.3447991Z CopyFilesToOutputDirectory:
2018-05-24T17:49:39.3447991Z   Copying file from "obj\x86\Release\PGScannerService.exe" to "bin\x86\Release\PGScannerService.exe".
2018-05-24T17:49:39.4078054Z   ScannerApp -> C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\bin\x86\Release\PGScannerService.exe
2018-05-24T17:49:39.4088055Z   Copying file from "obj\x86\Release\PGScannerService.pdb" to "bin\x86\Release\PGScannerService.pdb".
2018-05-24T17:49:39.4318078Z Done Building Project "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj" (default targets).
2018-05-24T17:49:39.4328079Z Done Building Project "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\PGScannerService.sln" (default targets).
2018-05-24T17:49:39.4358082Z 
2018-05-24T17:49:39.4358082Z Build succeeded.
2018-05-24T17:49:39.4398086Z 
2018-05-24T17:49:39.4398086Z "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\PGScannerService.sln" (default target) (1) ->
2018-05-24T17:49:39.4408087Z "C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj" (default target) (2) ->
2018-05-24T17:49:39.4408087Z (CoreCompile target) -> 
2018-05-24T17:49:39.4408087Z   MainForm.cs(205,30): warning CS0168: The variable 'ex' is declared but never used [C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj]
2018-05-24T17:49:39.4408087Z   MainForm.cs(40,29): warning CS0169: The field 'ScannerService.t' is never used [C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj]
2018-05-24T17:49:39.4408087Z   MainForm.cs(25,23): warning CS0414: The field 'ScannerService.MaxPaperHeightInInches' is assigned but its value is never used [C:\TFS2017_Builld_Agent2\_work\1\s\CorePlatform\ScannerService\ScannerService\ScannerApp.csproj]
2018-05-24T17:49:39.4408087Z 
2018-05-24T17:49:39.4408087Z     3 Warning(s)
2018-05-24T17:49:39.4408087Z     0 Error(s)
2018-05-24T17:49:39.4408087Z 
2018-05-24T17:49:39.4408087Z Time Elapsed 00:00:04.57
2018-05-24T17:49:39.4958142Z ##[section]Finishing: Build solution PGScannerService.sln

1 Ответ

0 голосов
/ 25 мая 2018

Спасибо, Даниэль - я добавил параметр:

/ p: OutDir = $ (Build.SourcesDirectory) / CorePlatform \ ScannerService \ ScannerService \ bin \ x86 \ Release

, и теперь он работает,Понятия не имею, почему я должен это делать, когда все мои другие проекты собираются как положено.

...