회사 지속적인 통합을 구현해야합니다. 프로젝트는 Visual Studio 2012와 함께 Lightswitch를 사용하여 개발됩니다. 우리는 Team Foundation Server를 사용하여 소스 버전을 관리합니다. 빌드 정의 및 에이전트 풀을 만들어 MsBuild 태스크를 사용하여 프로그래밍 방식으로 빌드 프로세스를 TFS로 실행하려고했습니다.오류 MSB4184 Team Foundation Build를 사용하여 프로젝트를 빌드 할 때의 Microsoft.LightSwitch.Publish.targets
빌드 솔루션 단계 이외의 모든 것이 오류를 발생시킵니다.
다음과2016-08-08T17:30:17.1606552Z Checking if artifacts directory exists: C:\TFSAgent\_work\1\a
2016-08-08T17:30:17.1606552Z Deleting artifacts directory.
2016-08-08T17:30:17.1606552Z Creating artifacts directory.
2016-08-08T17:30:17.1762560Z Checking if test results directory exists: C:\TFSAgent\_work\1\TestResults
2016-08-08T17:30:17.1762560Z Deleting test results directory.
2016-08-08T17:30:17.1762560Z Creating test results directory.
2016-08-08T17:30:17.2230568Z Starting: Get sources
2016-08-08T17:30:17.2386617Z Entering TfvcSourceProvider.PrepareRepositoryAsync
2016-08-08T17:30:17.2386617Z localPath=C:\TFSAgent\_work\1\s
2016-08-08T17:30:17.2386617Z clean=False
2016-08-08T17:30:17.2386617Z sourceVersion=199
2016-08-08T17:30:17.2386617Z mappingJson={"mappings":[{"serverPath":"$/OmniPay","mappingType":"map","localPath":"\\"},{"serverPath":"$/OmniPay/Drops","mappingType":"cloak","localPath":"\\"}]}
2016-08-08T17:30:17.2386617Z Syncing repository: OmniPay (TFVC)
2016-08-08T17:30:17.2386617Z workspaceName=ws_1_3
2016-08-08T17:30:21.4039019Z Workspace Name: ws_1_3;45d6157a-c0a3-480c-9615-310b82a07e0e
2016-08-08T17:30:21.5130997Z tf get /version:199
2016-08-08T17:30:22.6987201Z Done syncing repository OmniPay to version 199 (workspace version C199)
2016-08-08T17:30:22.6987201Z Leaving TfvcSourceProvider.PrepareRepositoryAsync
2016-08-08T17:30:22.9015180Z Running tasks
2016-08-08T17:30:22.9327171Z Starting task: Build solution $/OmniPay/0-Development/OmniMerchant/OmniMerchant.sln
2016-08-08T17:30:22.9951206Z C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". ([scriptblock]::Create('if (!$PSHOME) { $null = Get-Item -LiteralPath ''variable:PSHOME'' } else { Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1'')) ; Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1'')) }')) 2>&1 | ForEach-Object { Write-Verbose $_.Exception.Message -Verbose } ; $env:TF_BUILD = 'True' ; Import-Module -Name 'C:\TFSAgent\tasks\VSBuild\1.0.37\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1' -ArgumentList @{ NonInteractive = $true } -ErrorAction Stop ; $VerbosePreference = 'SilentlyContinue' ; $DebugPreference = 'SilentlyContinue' ; Invoke-VstsTaskScript -ScriptBlock ([scriptblock]::Create('. ''C:\TFSAgent\tasks\VSBuild\1.0.37\VSBuild.ps1'''))"
2016-08-08T17:30:24.8203363Z ##[warning]Visual Studio version '11.0' not found. Looking for the latest version.
2016-08-08T17:30:25.1947427Z ##[command]"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln" /nologo /nr:false /fl /flp:"logfile=C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln.log" /dl:CentralLogger,"C:\TFSAgent\tasks\VSBuild\1.0.37\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"C:\TFSAgent\tasks\VSBuild\1.0.37\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="10.0"
2016-08-08T17:30:25.3195436Z Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m".
2016-08-08T17:30:25.3351434Z Compilación iniciada a las 08/08/2016 12:30:25 p. m..
2016-08-08T17:30:25.5223466Z Proyecto "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln" en nodo 1 (destinos predeterminados).
2016-08-08T17:30:25.5223466Z ValidateSolutionConfiguration:
2016-08-08T17:30:25.5223466Z Compilando la configuración de soluciones "release|any cpu".
2016-08-08T17:30:25.7719622Z ##[error]C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Publish\v1.8\Microsoft.LightSwitch.Publish.targets(31,9): Error MSB4184: La expresión "[System.IO.Path]::Combine(null, bin\x86)" no se puede evaluar. El valor no puede ser nulo. Nombre del parámetro: path1
2016-08-08T17:30:25.7719622Z El proyecto "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln" (1) está compilando "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.ls3proj" (2) en el nodo 1 (destinos predeterminados).
2016-08-08T17:30:25.7719622Z C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Publish\v1.8\Microsoft.LightSwitch.Publish.targets(31,9): error MSB4184: La expresión "[System.IO.Path]::Combine(null, bin\x86)" no se puede evaluar. El valor no puede ser nulo. Nombre del parámetro: path1 [C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.ls3proj]
2016-08-08T17:30:25.8031476Z Compilación del proyecto terminada "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.ls3proj" (destinos predeterminados) -- ERROR.
2016-08-08T17:30:25.8499500Z Compilación del proyecto terminada "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln" (destinos predeterminados) -- ERROR.
2016-08-08T17:30:25.8499500Z ERROR al compilar.
2016-08-08T17:30:25.8499500Z "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.sln" (destino predeterminado) (1) ->
2016-08-08T17:30:25.8499500Z "C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.ls3proj" (destino predeterminado) (2) ->
2016-08-08T17:30:25.8499500Z C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Publish\v1.8\Microsoft.LightSwitch.Publish.targets(31,9): error MSB4184: La expresión "[System.IO.Path]::Combine(null, bin\x86)" no se puede evaluar. El valor no puede ser nulo. Nombre del parámetro: path1 [C:\TFSAgent\_work\1\s\0-Development\OmniMerchant\OmniMerchant.ls3proj]
2016-08-08T17:30:25.8499500Z 0 Advertencia(s)
2016-08-08T17:30:25.8499500Z 1 Errores
2016-08-08T17:30:25.8499500Z Tiempo transcurrido 00:00:00.29
2016-08-08T17:30:26.0371525Z ##[error]Process 'msbuild.exe' exited with code '1'.
2016-08-08T17:30:26.1307517Z Finishing task: VSBuild
2016-08-08T17:30:26.1307517Z Starting task: Copy Files to: $(build.artifactstagingdirectory)
2016-08-08T17:30:26.1463517Z Set workingFolder to default: C:\TFSAgent\tasks\CopyFiles\1.0.20
2016-08-08T17:30:26.4583580Z ##[debug]agent.workFolder=C:\TFSAgent\_work
2016-08-08T17:30:26.4583580Z ##[debug]loading inputs and endpoints
2016-08-08T17:30:26.4583580Z ##[debug]loading ENDPOINT_AUTH_$/
2016-08-08T17:30:26.4583580Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN
2016-08-08T17:30:26.4583580Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2016-08-08T17:30:26.4583580Z ##[debug]loading ENDPOINT_AUTH_SCHEME_$/
2016-08-08T17:30:26.4583580Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2016-08-08T17:30:26.4583580Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2016-08-08T17:30:26.4583580Z ##[debug]loading INPUT_CLEANTARGETFOLDER
2016-08-08T17:30:26.4583580Z ##[debug]loading INPUT_CONTENTS
2016-08-08T17:30:26.4583580Z ##[debug]loading INPUT_OVERWRITE
2016-08-08T17:30:26.4583580Z ##[debug]loading INPUT_SOURCEFOLDER
2016-08-08T17:30:26.4583580Z ##[debug]loading INPUT_TARGETFOLDER
2016-08-08T17:30:26.4583580Z ##[debug]loaded 11
2016-08-08T17:30:26.4583580Z ##[debug]check path : C:\TFSAgent\tasks\CopyFiles\1.0.20\task.json
2016-08-08T17:30:26.4583580Z ##[debug]set resource file to: C:\TFSAgent\tasks\CopyFiles\1.0.20\task.json
2016-08-08T17:30:26.4739560Z ##[debug]system.culture=en-US
2016-08-08T17:30:26.4739560Z ##[debug]Contents=**\bin\release\**
2016-08-08T17:30:26.4739560Z ##[debug]SourceFolder=C:\TFSAgent\_work\1\s
2016-08-08T17:30:26.4739560Z ##[debug]check path : C:\TFSAgent\_work\1\s
2016-08-08T17:30:26.4739560Z ##[debug]TargetFolder=C:\TFSAgent\_work\1\a
2016-08-08T17:30:26.4739560Z ##[debug]CleanTargetFolder=false
2016-08-08T17:30:26.4739560Z ##[debug]OverWrite=false
2016-08-08T17:30:26.4739560Z ##[debug]include content pattern: **\bin\release\**
2016-08-08T17:30:26.7547577Z ##[debug]find C:\TFSAgent\_work\1\s
2016-08-08T17:30:26.7547577Z ##[debug]2219 matches.
2016-08-08T17:30:26.8795588Z ##[debug]allFiles contains 2012 files
2016-08-08T17:30:26.8795588Z ##[debug]Include matching C:\TFSAgent\_work\1\s\**\bin\release\**
2016-08-08T17:30:26.9107601Z ##[debug]Include matched 0 files
2016-08-08T17:30:26.9107601Z found 0 files
2016-08-08T17:30:26.9263593Z Finishing task: CopyFiles
2016-08-08T17:30:26.9419655Z Starting task: Publish Artifact: drop
2016-08-08T17:30:26.9419655Z Set workingFolder to default: C:\TFSAgent\tasks\PublishBuildArtifacts\1.0.34
2016-08-08T17:30:27.2383627Z ##[debug]agent.workFolder=C:\TFSAgent\_work
2016-08-08T17:30:27.2383627Z ##[debug]loading inputs and endpoints
2016-08-08T17:30:27.2383627Z ##[debug]loading ENDPOINT_AUTH_$/
2016-08-08T17:30:27.2383627Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN
2016-08-08T17:30:27.2539635Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2016-08-08T17:30:27.2539635Z ##[debug]loading ENDPOINT_AUTH_SCHEME_$/
2016-08-08T17:30:27.2539635Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2016-08-08T17:30:27.2539635Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2016-08-08T17:30:27.2539635Z ##[debug]loading INPUT_ARTIFACTNAME
2016-08-08T17:30:27.2539635Z ##[debug]loading INPUT_ARTIFACTTYPE
2016-08-08T17:30:27.2539635Z ##[debug]loading INPUT_PATHTOPUBLISH
2016-08-08T17:30:27.2539635Z ##[debug]loading INPUT_TARGETPATH
2016-08-08T17:30:27.2539635Z ##[debug]loaded 10
2016-08-08T17:30:27.2539635Z ##[debug]check path : C:\TFSAgent\tasks\PublishBuildArtifacts\1.0.34\task.json
2016-08-08T17:30:27.2539635Z ##[debug]set resource file to: C:\TFSAgent\tasks\PublishBuildArtifacts\1.0.34\task.json
2016-08-08T17:30:27.2539635Z ##[debug]system.culture=en-US
2016-08-08T17:30:27.2539635Z ##[debug]PathtoPublish=C:\TFSAgent\_work\1\a
2016-08-08T17:30:27.2539635Z ##[debug]check path : C:\TFSAgent\_work\1\a
2016-08-08T17:30:27.2539635Z ##[debug]ArtifactName=drop
2016-08-08T17:30:27.2539635Z ##[debug]ArtifactType=Container
2016-08-08T17:30:27.2695627Z ##[debug]TargetPath=\\my\share\Merchant\20160808.4
2016-08-08T17:30:28.6267793Z Max Concurrent Uploads 2, Max Creators 1
2016-08-08T17:30:28.7048085Z Found 0 files to upload.
2016-08-08T17:30:28.7203860Z Created 0 files without uploading content. Total files processed 0
2016-08-08T17:30:28.7203860Z Uploaded artifact 'C:\TFSAgent\_work\1\a' to container folder 'drop' of build 24.
2016-08-08T17:30:29.6719971Z Associated artifact 12 with build 24
2016-08-08T17:30:29.6875965Z Finishing task: PublishBuildArtifacts
2016-08-08T17:30:29.7032002Z ##[error]System.Exception: Task VSBuild failed. This caused the job to fail. Look at the logs for the task for more details.
2016-08-08T17:30:29.7032002Z ##[error] en Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource)
29 행에 오류가 될 때 : 영어
2016-08-08T17:30:25.7719622Z ##[error]C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v3.0\Publish\v1.8\Microsoft.LightSwitch.Publish.targets(31,9): Error MSB4184: La expresión "[System.IO.Path]::Combine(null, bin\x86)" no se puede evaluar. El valor no puede ser nulo. Nombre del parámetro: path1
의미
: 오류 MSB4184 : "[System.IO.Path] :: 결합 (null의 경우, 빈 \ 다음은 추적하다 x86) "표현식을 평가할 수 없습니다. 값은 null 일 수 없습니다. 매개 변수 이름 : 깊은 Microsoft.LightSwitch.Publish.Targets 라인 (39)으로가는경로 1 :
<!--If the path to the sign tool is not set, try the Windows SDK path or the Framework SDK path -->
<_WindowsSDKSignToolPath Condition="'$(SignToolPath)' == ''">$([System.IO.Path]::Combine('$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots', 'KitsRoot', null, RegistryView.Registry32, RegistryView.Default))', 'bin\x86'))</_WindowsSDKSignToolPath>
비주얼 스튜디오 2012가 완벽하게 작동 사용하여 프로젝트를 컴파일하지만 오류가 TFS 빌드가 줄을 OmniMerchant.ls3proj을 의미 던졌습니다 :
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\LightSwitch\$(LightSwitchVersion)\Microsoft.LightSwitch.targets" />
내가 HKEY_LOCAL_MACHINE의 \ 마이크로 소프트 \ 윈도우 키트 \ SOFTWARE \ 설치된 뿌리와 서버 KitsRoot 키를 생성, 또한 내가 개발자 머신을 기반으로 서버에있는 모든 폴더와 파일을 마이크로 소프트 \으로 VisualStudio \ LightSwitch을 복사하지만 오류 일 아프다. 제발, 도움이 필요해! 덕분에
로그에 전쟁이 있음을 확인했습니다. '## [경고] Visual Studio 버전 '11 .0'을 찾을 수 없습니다. 최신 버전을 찾고 있습니다. '빌드 정의에서 올바른 버전을 가리 켰습니까? TFS가 아닌 빌드 에이전트에서 로컬 빌드 환경과 함께 작동 했습니까? 또한'release | x86 '을'release | x86'으로 바꾸는 것으로 다시 시도하십시오. –
Patrick, 안녕하세요, Visual Studio 2012를 빌드 서버 또는 일부 SDK에 설치해야합니까? –
예, 빌드 서버 (빌드 에이전트)의 환경이 로컬 환경과 동일한 지 확인하는 것이 좋습니다. 이렇게하면 빌드 실패의 위험을 크게 줄일 수 있습니다. VS2012를 빌드 에이전트에 설치 한 후 다시 시도하십시오. –