【问题标题】:VS2017 - Ionic/Cordova - Unable to build iOS RemoteBuild - Path too longVS2017 - Ionic/Cordova - 无法构建 iOS RemoteBuild - 路径太长
【发布时间】:2017-03-17 16:05:45
【问题描述】:

我最近从 VS2015 升级到 VS2017,现在无法为 iOS 构建我的 Ionic Cordova 项目。

我可以很好地为 Android 构建。

我复制了 iOS 远程构建设置(并检查了它在我的 Mac 上运行的服务器等),但是当我尝试构建时,我收到以下错误:

1>------ Build started: Project: PROJECTNAME, Configuration: Debug iOS ------
Cordova 6.3.1
------ Platform ios already exists
 ____                      _       _           _ _     _ 
|  _ \ ___ _ __ ___   ___ | |_ ___| |__  _   _(_) | __| |
| |_) / _ \ '_ ` _ \ / _ \| __/ _ \ '_ \| | | | | |/ _` |
|  _ <  __/ | | | | | (_) | ||  __/ |_) | |_| | | | (_| |
|_| \_\___|_| |_| |_|\___/ \__\___|_.__/ \__,_|_|_|\__,_|

-----------------------------------------------------------------------------
Sending the build to the remote build server
-----------------------------------------------------------------------------
------ Incremental Build: False
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: The "VsTac" task failed unexpectedly.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: System.IO.PathTooLongException: 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.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018:    at System.IO.PathHelper.GetFullPathName()

我在没有运行远程构建代理的情况下对此进行了测试,但它仍然失败,所以我怀疑这与我的 Windows 机器有关。但是,由于 Android 构建良好,我不确定。

我不确定从这里尝试什么;不知道如何进一步调试。

有什么想法吗?

【问题讨论】:

  • 您可以尝试将您的项目移近驱动器的根目录吗?这可能会解决它。
  • @MichaelBraude,我会试试这个并告诉你。
  • 这不是 2017 年的问题 - 我在 2015 年看到它的路径很长,@MichaelBraude 的回答将根据我的经验工作

标签: ios cordova visual-studio-cordova visual-studio-2017 taco


【解决方案1】:

这可能是因为您的项目具有带有长嵌套文件路径的 npm 包。远程构建无法复制它们,因为它们超出了 Windows 的 max_path 限制。

将项目移近驱动器的根目录应该可以解决问题。

【讨论】:

  • 是的,就是这样 - 我尝试将我的项目移动到 C:\ 驱动器,但没有成功。然后我意识到 [github.com/npm/npm/releases/tag/v3.0.0](node3.x 改变了 node_modules 文件夹的填充方式)解决了问题。
猜你喜欢
  • 1970-01-01
  • 2018-06-07
  • 1970-01-01
  • 2016-07-13
  • 2019-12-19
  • 2016-02-29
  • 2012-03-24
  • 2020-09-05
  • 1970-01-01
相关资源
最近更新 更多