2016-07-04 7 views
0

그래서 마침내 TFS에 손을 얹고 몇 가지 테스트 (NUnit)로 작은 응용 프로그램을 만들고 TFS에서 빌드하도록하고 싶습니다.TFS는 NuGet 스크립트를 실행하지 않습니다

****************************************************************************** 
Starting: Build 
****************************************************************************** 
Executing the following commandline: 
C:\Users\rab\Desktop\BuildAgent\agent\worker\vsoWorker.exe /name:Worker-6726df74-da4c-466a-b1c6-1f2b78b88a8d /id:6726df74-da4c-466a-b1c6-1f2b78b88a8d /rootFolder:"C:\Users\rab\Desktop\BuildAgent" /logger:Forwarding,1.0.0;Verbosity=Verbose,Name=Agent4-bbf8df0bd72035f895b9972ec79f2bcb;JobId=6726df74-da4c-466a-b1c6-1f2b78b88a8d 
****************************************************************************** 
Starting: Get sources 
****************************************************************************** 
Syncing repository: RABs Git test (Git) 
Starting fetch... 
Checking out 1f6c87dfd38578b9d0f365f83a92fc4ef9bc172e to C:\Users\rab\Desktop\BuildAgent\_work\1\s 
Checked out branch refs/heads/master for repository RABs Git test at commit 1f6c87dfd38578b9d0f365f83a92fc4ef9bc172e 
****************************************************************************** 
Running tasks 
****************************************************************************** 
****************************************************************************** 
Starting task: NuGet restore GitDemoProject.sln 
****************************************************************************** 
Set workingFolder to default: C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18 
Executing the powershell script: C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1 
Attempting to perform the NormalizeRelativePath operation on the 'FileSystem' provider failed for path 'C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18'. Access is denied 
****************************************************************************** 
Finishing task: NuGetInstaller 
****************************************************************************** 
****************************************************************************** 
Starting task: Copy Files to: $(build.artifactstagingdirectory) 
****************************************************************************** 
Set workingFolder to default: C:\Users\rab\Desktop\BuildAgent\tasks\CopyFiles\1.0.13 
fs.js:887 
    return binding.lstat(pathModule._makeLong(path)); 
       ^
Error: EPERM: operation not permitted, lstat 'C:\Users\rab' 
    at Error (native) 
    at Object.fs.lstatSync (fs.js:887:18) 
    at Object.realpathSync (fs.js:1518:21) 
    at toRealPath (module.js:126:13) 
    at Function.Module._findPath (module.js:165:20) 
    at Function.Module._resolveFilename (module.js:337:25) 
    at Function.Module._load (module.js:290:25) 
    at Function.Module.runMain (module.js:447:10) 
    at startup (node.js:146:18) 
    at node.js:404:3 
****************************************************************************** 
Finishing task: CopyFiles 
****************************************************************************** 
****************************************************************************** 
Starting task: Publish Artifact: drop 
****************************************************************************** 
Set workingFolder to default: C:\Users\rab\Desktop\BuildAgent\tasks\PublishBuildArtifacts\1.0.28 
fs.js:887 
    return binding.lstat(pathModule._makeLong(path)); 
       ^
Error: EPERM: operation not permitted, lstat 'C:\Users\rab' 
    at Error (native) 
    at Object.fs.lstatSync (fs.js:887:18) 
    at Object.realpathSync (fs.js:1518:21) 
    at toRealPath (module.js:126:13) 
    at Function.Module._findPath (module.js:165:20) 
    at Function.Module._resolveFilename (module.js:337:25) 
    at Function.Module._load (module.js:290:25) 
    at Function.Module.runMain (module.js:447:10) 
    at startup (node.js:146:18) 
    at node.js:404:3 
****************************************************************************** 
Finishing task: PublishBuildArtifacts 
****************************************************************************** 
Task NuGetInstaller failed. This caused the job to fail. Look at the logs for the task for more details. 
****************************************************************************** 
Finishing Build 
****************************************************************************** 

그것은 최초의 타격을주는 라인 Attempting to perform the NormalizeRelativePath operation on the 'FileSystem' provider failed for path 'C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18'. Access is denied : 그것은 NuGet을 사용하려고 할 때 그러나, 빌드가 실패합니다. 나뿐만 아니라 많은 오류를 준 것을 실행하려고 :

PS C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18> .\NuGetInstaller.ps1 
import-module : The specified module 'Microsoft.TeamFoundation.DistributedTask.Task.Internal' was not loaded because no 
valid module file was found in any module directory. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:12 char:1 
+ import-module "Microsoft.TeamFoundation.DistributedTask.Task.Internal" 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ResourceUnavailable: (Microsoft.TeamF...k.Task.Internal:String) [Import-Module], FileNot 
    FoundException 
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand 

import-module : The specified module 'Microsoft.TeamFoundation.DistributedTask.Task.Common' was not loaded because no v 
alid module file was found in any module directory. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:13 char:1 
+ import-module "Microsoft.TeamFoundation.DistributedTask.Task.Common" 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ResourceUnavailable: (Microsoft.TeamF...ask.Task.Common:String) [Import-Module], FileNot 
    FoundException 
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand 

Join-Path : Cannot bind argument to parameter 'Path' because it is null. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\VsoNuGetHelper.ps1:3 char:33 
+ $nuGetTempDirectory = Join-Path $Env:SYSTEM_ARTIFACTSDIRECTORY "NuGet\" 
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : InvalidData: (:) [Join-Path], ParameterBindingValidationException 
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom 
    mand 

Join-Path : Cannot bind argument to parameter 'Path' because it is null. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\VsoNuGetHelper.ps1:4 char:34 
+ $tempNuGetConfigPath = Join-Path $nuGetTempDirectory "newNuGet.config" 
+         ~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : InvalidData: (:) [Join-Path], ParameterBindingValidationException 
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCom 
    mand 

Get-LocalizedString : The term 'Get-LocalizedString' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
again. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:26 char:12 
+  throw (Get-LocalizedString -Key "Solution parameter must be set") 
+   ~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Get-LocalizedString:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

Convert-String : The term 'Convert-String' is not recognized as the name of a cmdlet, function, script file, or operabl 
e program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:29 char:21 
+ $b_excludeVersion = Convert-String $excludeVersion Boolean 
+      ~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Convert-String:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

Convert-String : The term 'Convert-String' is not recognized as the name of a cmdlet, function, script file, or operabl 
e program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:30 char:14 
+ $b_noCache = Convert-String $noCache Boolean 
+    ~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Convert-String:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

Get-LocalizedString : The term 'Get-LocalizedString' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
again. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:54 char:12 
+  throw (Get-LocalizedString -Key "No solution was found using search pattern ... 
+   ~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Get-LocalizedString:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

Get-ToolPath : The term 'Get-ToolPath' is not recognized as the name of a cmdlet, function, script file, or operable pr 
ogram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:65 char:18 
+  $nuGetPath = Get-ToolPath -Name 'NuGet.exe'; 
+     ~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Get-ToolPath:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

Get-LocalizedString : The term 'Get-LocalizedString' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
again. 
At C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1:70 char:12 
+  throw (Get-LocalizedString -Key "Unable to locate {0}" -ArgumentList 'nuget. ... 
+   ~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : ObjectNotFound: (Get-LocalizedString:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 

PS C:\Users\rab\Desktop\BuildAgent\tasks\NuGetInstaller\0.1.18> 

답변

1

대답 found here을하지만,이 솔루션 정확히 왜 모르겠어요.

c:\SomeName로 ( Agent, task, ConfigureAgent.cmd ...로) 에이전트 폴더를 이동

, 당신은 좋다.

관련 문제