构建 ASP.NET 5 网站;我无法使用以下方法完成构建:Team Foundation Server Express 2015,14.0.23128.0(Tfs2015)。我按照这些说明“Build and Deploy your ASP.NET 5 Application to an Azure Web App”,我的第一个问题是:
..但我修正了这个“MSBUILD : error MSB1008: Only one project can be specified”。但是当我重新运行构建时,我现在得到了这个错误:
##[error](152,5): Error : 'gulp' is not recognized as an internal or external command, 1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): error : 'gulp' is not recognized as an internal or external command, [C:\TfsData\Build\_work\6335c966\xxxx xxxxxx xxxx\<name>\src\<name>\<ProjectName>.xproj]
现在我的问题是因为这个错误来自TFS MSBuild;这是我必须执行的单独安装,以完成构建的这一部分,因为我在这里阅读“gulp command not found - error after installing gulp”?
编辑:
构建失败。
“C:\ TfsData \ Build_work \ 6335c966 \ xxxx xxxxxxx xxxx \ XxxxXxxxxxxXxxx \ src \ XxxxXxxxxxxXxxx \ xxxxXxxxxxxXxxx.xproj”
(Build; FileSystemPublish target)(1) - &gt;
(GatherAllFilesToPublish target) - &gt;
DNU:错误:指定的路径,文件名或两者都太长。完全限定的文件名必须少于260个字符,目录名必须少于248个字符。
[C:\ TfsData \ Build_work \ 6335c966 \ xxxx xxxxxxx xxxx \ XxxxXxxxxxxXxxx \ src \ XxxxXxxxxxxXxxx \ xxxxXxxxxxxXxxx.xproj]
那么这是否意味着现在更短的项目路径? :/
修改
我希望这将是我担心的结束,但在重新运行完整版本后,我现在在PowerShell脚本中出现错误:
错误消息:
2016-04-30T01:09:30.9536533Z Feeds used:
2016-04-30T01:09:30.9692820Z https://api.nuget.org/v3-flatcontainer/
2016-04-30T01:09:31.6708908Z ##[error]Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than
2016-04-30T01:09:31.6708908Z ##[error]260 characters, and the directory name must be less than 248 characters.
2016-04-30T01:09:31.6865190Z ##[error]At C:\TfsData\Build\_work\2b986420\<name>\RDPlus\Prebuild.ps1:24 char:1
2016-04-30T01:09:31.6865190Z ##[error]+ Get-ChildItem -Path $PSScriptRoot\src -Filter project.json -Recurse | ...
2016-04-30T01:09:31.6865190Z ##[error]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-04-30T01:09:31.6865190Z ##[error] + CategoryInfo : ReadError: (C:\TfsData\Buil...es\spdx-correct:String) [Get-ChildItem], PathTooLongExcept
2016-04-30T01:09:31.6865190Z ##[error] ion
2016-04-30T01:09:31.6865190Z ##[error] + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
2016-04-30T01:09:31.6865190Z ##[error]
2016-04-30T01:09:31.6865190Z ##[error]Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than
2016-04-30T01:09:31.6865190Z ##[error]260 characters, and the directory name must be less than 248 characters.
2016-04-30T01:09:31.6865190Z ##[error]At C:\TfsData\Build\_work\2b986420\<name>\RDPlus\Prebuild.ps1:24 char:1
2016-04-30T01:09:31.6865190Z ##[error]+ Get-ChildItem -Path $PSScriptRoot\src -Filter project.json -Recurse | ...
2016-04-30T01:09:31.6865190Z ##[error]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2016-04-30T01:09:31.6865190Z ##[error] + CategoryInfo : ReadError: (C:\TfsData\Buil...se\node_modules:String) [Get-ChildItem], PathTooLongExcept
2016-04-30T01:09:31.6865190Z ##[error] ion
2016-04-30T01:09:31.6865190Z ##[error] + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand
2016-04-30T01:09:31.6865190Z ##[error]
..... lots more of the same..
这些错误来自“Build and Deploy your ASP.NET 5 Application to an Azure Web App”指示中的Prebuild.ps1
# 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 }
感谢您的帮助!...