2015-12-28 9 views
1

Я пытаюсь сделать dnu restore на моем приложении ASP.NET 5 RC1, используя новую систему сборки, доступную в Visual Studio Team Services (aka Visual Studio Online).Ошибка ASP.NET 5 RC1 после «postrestore» при построении на VSTS

Мой project.json содержит команду postrestore следующим образом:

"scripts": { 
    "postrestore": [ "npm install", "bower install", "gulp clean", "gulp min" ] 
} 

После dnu restore я могу увидеть ошибки в журнале сборки повторяется несколько раз говорил:

2015-12-28T17:49:15.6910525Z ##[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.

Если я делаю dnu restore в командной строке на моей локальной машине dev. Эта проблема не возникает. Почему это происходит при сборке VSTS и как его исправить?

Мой сценарий сборки выглядит следующим образом:

#Requires -Version 3.0 

param($vsoProjectName, $projectName, $buildConfiguration, $buildSourcesDirectory) 

$VerbosePreference = "continue" 
$ErrorActionPreference = "Continue" 

&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} 
$globalJson = Get-Content -Path "$PSScriptRoot\global.json" -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore 

if($globalJson) 
{ 
    $dnxVersion = $globalJson.sdk.version 
} 
else 
{ 
    Write-Warning "Unable to locate global.json to determine using 'latest'" 
    $dnxVersion = "latest" 
} 

& $env:USERPROFILE\.dnx\bin\dnvm install $dnxVersion -r coreclr -arch x86 -Persistent 

$dnxRuntimePath = "$($env:USERPROFILE)\.dnx\runtimes\dnx-coreclr-win-x86.$dnxVersion" 

Write-Host "BuildSourcesDirectory: $buildSourcesDirectory" 
Write-Host "Project Path: $PSScriptRoot\src\$projectName" 
Write-Host "Publish output: $buildSourcesDirectory\$vsoProjectName\artifacts\bin\$buildConfiguration\Publish" 

Write-Host "Print dnu version" 

& "dnu" "--version" 

Write-Host "Starting DNU restore on all projects" 

# run DNU restore on all project.json files in the src folder including 2>1 to redirect stderr to stdout for badly behaved tools 
Get-ChildItem -Path $PSScriptRoot\src -Filter project.json -Recurse | ForEach-Object { & dnu restore $_.FullName 2>1 } 

Write-Host "Finished DNU restore" 

Вот часть из бревен, когда postrestore выполняется:

2015-12-28T17:46:49.2776081Z Executing script 'postrestore' in project.json 
2015-12-28T17:48:57.7983599Z [email protected] node_modules\rimraf 
2015-12-28T17:48:57.7993593Z [email protected] node_modules\gulp-concat 
2015-12-28T17:48:57.7993593Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected]) 
2015-12-28T17:48:57.8003598Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8003598Z ΓööΓöÇΓöÇ [email protected] ([email protected]) 
2015-12-28T17:48:57.8013590Z [email protected] node_modules\gulp-cssmin 
2015-12-28T17:48:57.8163579Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8163579Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8173592Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8173592Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8183601Z Γö£ΓöÇΓöÇ [email protected] ([email protected]) 
2015-12-28T17:48:57.8183601Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8193590Z ΓööΓöÇΓöÇ [email protected] ([email protected], [email protected]) 
2015-12-28T17:48:57.8193590Z [email protected] node_modules\gulp 
2015-12-28T17:48:57.8193590Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8203588Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8203588Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8213583Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8213583Z Γö£ΓöÇΓöÇ [email protected] ([email protected]) 
2015-12-28T17:48:57.8223587Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8223587Z Γö£ΓöÇΓöÇ [email protected] ([email protected]) 
2015-12-28T17:48:57.8223587Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8233588Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8233588Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8243588Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8243588Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8253601Z ΓööΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], glob-[email protected], [email protected]) 
2015-12-28T17:48:57.8253601Z [email protected] node_modules\gulp-uglify 
2015-12-28T17:48:57.8263595Z Γö£ΓöÇΓöÇ [email protected] 
2015-12-28T17:48:57.8263595Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected]) 
2015-12-28T17:48:57.8273590Z Γö£ΓöÇΓöÇ [email protected] ([email protected]) 
2015-12-28T17:48:57.8273590Z Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:48:57.8283589Z ΓööΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected]) 
2015-12-28T17:49:13.9980542Z [17:49:13] Using gulpfile C:\a\1\s\AspNet5Rc1\src\AspNet5Rc1\gulpfile.js 
2015-12-28T17:49:13.9980542Z [17:49:13] Starting 'clean:js'... 
2015-12-28T17:49:13.9990527Z [17:49:13] Starting 'clean:css'... 
2015-12-28T17:49:13.9990527Z [17:49:13] Finished 'clean:js' after 1.77 ms 
2015-12-28T17:49:14.0000527Z [17:49:13] Finished 'clean:css' after 1.62 ms 
2015-12-28T17:49:14.0000527Z [17:49:13] Starting 'clean'... 
2015-12-28T17:49:14.0440528Z [17:49:13] Finished 'clean' after 6.9 ╬╝s 
2015-12-28T17:49:15.4640537Z [17:49:15] Using gulpfile C:\a\1\s\AspNet5Rc1\src\AspNet5Rc1\gulpfile.js 
2015-12-28T17:49:15.4650529Z [17:49:15] Starting 'min:js'... 
2015-12-28T17:49:15.4650529Z [17:49:15] Starting 'min:css'... 
2015-12-28T17:49:15.5170528Z [17:49:15] Finished 'min:js' after 69 ms 
2015-12-28T17:49:15.5420528Z [17:49:15] Finished 'min:css' after 83 ms 
2015-12-28T17:49:15.5490528Z [17:49:15] Starting 'min'... 
2015-12-28T17:49:15.5490528Z [17:49:15] Finished 'min' after 18 ╬╝s 
2015-12-28T17:49:15.5660525Z Restore complete, 246685ms elapsed 
2015-12-28T17:49:15.5670522Z Feeds used: 
2015-12-28T17:49:15.5670522Z  https://api.nuget.org/v3-flatcontainer/ 
2015-12-28T17:49:15.5700509Z Installed: 
2015-12-28T17:49:15.5720509Z  211 package(s) to C:\Users\buildguest\.dnx\packages 
2015-12-28T17:49:15.6910525Z ##[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. 
2015-12-28T17:49:15.6930524Z ##[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. 
2015-12-28T17:49:15.6940524Z ##[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. 
2015-12-28T17:49:15.6990526Z ##[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. 
2015-12-28T17:49:15.7750517Z ##[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. 
2015-12-28T17:49:15.7760529Z ##[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. 
2015-12-28T17:49:15.7810522Z ##[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. 
2015-12-28T17:49:15.7830524Z ##[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. 
2015-12-28T17:49:15.8200522Z ##[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. 
2015-12-28T17:49:15.8230511Z ##[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. 
2015-12-28T17:49:15.8280527Z ##[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. 
2015-12-28T17:49:15.8300524Z ##[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. 
2015-12-28T17:49:15.8630530Z ##[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. 
2015-12-28T17:49:15.8640526Z ##[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. 
2015-12-28T17:49:15.8690519Z ##[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. 
2015-12-28T17:49:15.8710530Z ##[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. 
2015-12-28T17:49:15.9030521Z Finished DNU restore 

ответ

0

Вы ударяют файл NTFS, путь и длина имени предел 255 символов. NPM-вложение зависимостей пакетов является причиной того, что вы нажимаете ограничение, которое является известной проблемой узла в стеке Windows. Вам следует попытаться обновить NPM до последней версии 3.0 или выше, где теперь они используют плоский подход для обработки зависимостей пакетов.

Выполните следующие действия:

1) Обновление НПМ на машине построения, путем обновления до последней версии узла (скачать с https://nodejs.org/download).

2) Убедитесь, что Visual Studio Team System не использует упакованную версию NodeJS при создании проекта, передав в MSBuild следующий параметр.

/p:ExternalToolsPath="C:\Program Files\nodejs" 

или (x86), если применимо:

/p:ExternalToolsPath="C:\Program Files (x86)\nodejs" 
+1

На VSTS Как обеспечить точку 1 с учетом системы сборки размещается и сборка агент может запустить любую сборку машину? Что касается пункта 2, я не вызываю MSBuild напрямую, так где мне передать информацию о пути nodejs? – neodymium