我将使用TeamCity来构建和部署我们的演示网站。我们有一个名为HTML Demo Site的配置,其中一个构建步骤是使用NAnt将HTML部署到该网站上。
构建文件中定义了一个目标:
构建文件中定义了一个目标:
<target name="deploy-html" description="Deploys the HTML to the demo server">
<echo message="Deploying HTML to the demo server..."/>
<copy todir="\\<server>\<dir>\<client>" includeemptydirs="true" overwrite="true">
<fileset basedir="..\html\_master">
<include name="**\*"/>
<exclude name="node_modules\**"/>
</fileset>
</copy>
</target>
每次在TeamCity上运行构建时,都会出现以下错误:
C:\tc\w\9149e011dfa8657d\build_scripts\website.build(27,14):
[NAnt output] Error creating FileSet.
[NAnt output] 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.
因此,我尝试在PowerShell上运行,以获取超出最大长度的文件列表:
Get-ChildItem -Recurse | Where-Object {$_.FullName.Length -gt 248}
但是返回的唯一文件是在node_modules目录下的文件。但是在构建文件中,它被排除了。所以我不确定还有哪里可以查看?有什么想法吗?