将文件添加到Customization Manager中的文件列表时出现文件路径错误 [英] Getting File Path error while adding file to files list in Customization Manager

查看:129
本文介绍了将文件添加到Customization Manager中的文件列表时出现文件路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在自定义管理器中将文件添加到文件列表时,出现文件路径或文件名过长错误(请参见下面的屏幕截图)。我将其升级到2018 R1后发生了这种情况。在此之前,它一直可以正常使用到2017 R2,但在将站点升级到2018 R1之后却没有。我试图在事件日志或跟踪中进行搜索,但是没有发现任何特定于错误的信息。

I am getting the file path or file name too long error (see screenshot below) while adding a file to the files list in customization manager. This happened after I upgrade it to 2018 R1. Before that it was working as normal till 2017 R2 but not after upgrading the site to 2018 R1. I tried to search in event log or trace, but did not find anything specific to error.

当我创建一个新项目,创建一个新的VS项目,在VS中进行编译,然后在自定义管理器中单击添加文件按钮时,甚至会发生这种情况。如果我不将其绑定到VS,那么我可以单击添加按钮,并且可以正常运行。

This is even happening when I create a new project, create a new VS project, compile in VS and then click on add file button in customization manager. If I do not bind it to VS then I am able to click on the add button and it works perfectly ok.

BTW,我正在使用VS 2015。

BTW, I am using VS 2015.

不知道出了什么问题。有建议吗?

Not sure what is wrong. Any suggestions?

推荐答案

Krunal,该错误消息大部分是不言自明的。网站文件夹中的某些文件超出了Windows中定义的限制,因此会弹出错误消息。如果您在 Program Files 文件夹下创建本地Acumatica网站,我强烈建议在 C 驱动器上创建一个文件夹,并将所有新网站放置在此文件夹中。希望将您的网站移动到另一个位置将完全解决超出路径和/或文件名大小的问题。

Krunal, the error message is for the most part self-explanatory. Some files inside your website folder exceed the limits defined in Windows and therefore cause the error message to pop up. If you create local Acumatica websites under the Program Files folder, I would highly recommend to create a folder on the C drive and place all your new websites in this folder. Hope that moving your website to another location will completely resolve an issue with an exceeded path and/or file name size.

由于此错误是由.Net运行时引发的,并且是由Windows中定义的限制引起的,因此我高度怀疑Acumatica Customization Manager中是否可以执行某些操作来防止这个错误是将来发生的。对我来说,这显然是一个配置问题,非常适合您的开发环境。

Because this error was thrown by the .Net runtime and is caused by restrictions defined in Windows, I highly doubt there is something that can be done inside Acumatica Customization Manager to prevent this error from happening in the future. To me, this is clearly a configuration issue, very specific to your development environment.

更新:

我对此进行了一些额外的研究,显然VS 2015附带了旧版本的Node.js和NPM(节点包管理器)。由于VS 2015附带的NPM版本不会创建打包的平面存储,因此您会在Acumatica网站的 node_modules 文件夹中获得一个非常长的文件夹结构,这最终导致文件路径或文件名过长错误。

I did some additional research on that subject and apparently VS 2015 comes with an old version of Node.js and NPM (Node Package Manager). Because the version of NPM shipped with VS 2015 does not create a flat store of packages, you get this enormously long folder structure inside Acumatica website's node_modules folder, which eventually results in the file path or file name too long error.

我相信,VS 2017随附了更新版本的Node.js和NPM,它们确实创建了统一的软件包存储。这应该可以解释为什么从VS 2015切换到VS 2017之后,2018 R1 Acumatica网站的问题会自动得到解决的原因。

I believe, VS 2017 comes with a more recent version of Node.js and NPM, which do create a flat store of packages. This should explain why an issue with a 2018 R1 Acumatica website got automatically resolved after you switched to VS 2017 from VS 2015.

根据此博客文章,我能够将node.js和NPM升级到最新版本,并设置VS 2015以使用最新版本的node。 js和NPM,而不是它附带的旧版本。从我的Acumatica网站删除 node_modules 文件夹并重新启动Visual Studio之后,此问题似乎终于得到解决。

Following the suggestion from this blog post, I was able to upgrade node.js and NPM to their latest version and set up VS 2015 to use the latest version of node.js and NPM instead of the old one it comes with. After deleting the node_modules folder from my Acumatica website and restarting Visual Studio, this issue seems to finally get resolved.

这篇关于将文件添加到Customization Manager中的文件列表时出现文件路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆