VSTS在线新建系统错误"指定的路径,文件名或两者都太长。"

时间:2016-04-03 16:16:56

标签: azure build-process azure-devops azure-pipelines-build-task pathtoolongexception

我使用新的Visual Studio Team Services Online运行简单构建,包括自定义Windows Server 2012 R2 VM上的以下任务:

  1. nuget installer
  2. NPM
  3. 咕嘟咕嘟
  4. Visual Studio Build
  5. Visual Studio测试
  6. Azure Web App部署
  7. 指数来源&发布符号
  8. 发布构建工件
  9. 任务#1到#4成功运行,任务#5(vstest)抛出以下错误:

    Starting task: Test Assemblies **\$(BuildConfiguration)\*test*.dll;-:**\obj\**
    Executing the powershell script: C:\a\tasks\VSTest\1.0.34\VSTest.ps1
    Entering script VSTest.ps1
    vsTestVersion = 14.0
    testAssembly = **\release\*test*.dll;-:**\obj\**
    testFiltercriteria = 
    runSettingsFile = C:\a\_work\1\s
    codeCoverageEnabled = false
    pathtoCustomTestAdapters = 
    overrideTestrunParameters = 
    otherConsoleOptions = 
    testRunTitle = 
    platform = any cpu
    configuration = release
    publishRunAttachments = true
    ##[error]The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    ##[warning]No test assemblies found matching the pattern: '**\release\*test*.dll;-:**\obj\**'.
    Finishing task: VSTest
    

1 个答案:

答案 0 :(得分:2)

This blog posts解释了问题(npm下载创建的路径太长)以及如何解决它。