如何在使用允许的最大字符重命名EXE后解决CLR错误 [英] How to resolve CLR error after renaming the EXE with maximum allowed characters

查看:182
本文介绍了如何在使用允许的最大字符重命名EXE后解决CLR错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我已经创建了基于窗体应用程序的示例窗口。(exe名称为Sample.exe)



我将'Sample.exe'重命名为启动前Windows允许的最大字符长度。



我收到错误(CLR错误:8007007a。该程序现在将终止。)



如何解决此问题。



提前致谢。

Hi All,

I have created sample windows form based application.(Exe name is Sample.exe)

I renamed ‘Sample.exe’ to maximum length of characters allowed by windows before launching.

I am getting an error (CLR error:8007007a. The program will now terminate.)

How to resolve this issue.

Thanks in advance.

推荐答案

简单:不要将文件重命名为最大字符长度 - 无论这意味着什么。



如果要更改EXE文件名,请更改项目并重建:这样保持一致,如果出现问题,您可以从可执行文件追溯到源代码。
Simple: Don't rename the file to the "maximum length of characters" - whatever that means.

If you want to change the EXE file name, then change the project and rebuild: that way it is kept consistent and you can trace back from your executable to the source code if there is a problem.


所以你重命名可执行文件有260个字符的文件名?这有点愚蠢。



实际上,文件的完全限定路径不能超过260个字符。



你还不完全清楚你做了什么。



但是,无论如何,将文件重命名为相当小的东西应该修复它。我原以为这很明显。





命名文件,路径和命名空间 [ ^ ]
So you renamed the executable to have a 260 character filename? That's kind of stupid.

Actually, the fully qualified path to the file cannot be longer than 260 characters.

You're not entirely clear on exactly what you did.

But, in any case, renaming the file back to something considerably smaller should fix it. I would have thought that to be quite obvious.


Naming Files, Paths, and Namespaces[^]


文件名的各个组件(即路径上的每个子目录,最终文件名限制为255个字符,总路径长度限制为大约32,000个字符。但是,如果可能,通常应尝试将路径长度限制在260个字符以下(MAX_PATH)。



所以...不要重命名你的文件!
"Individual components of a filename (i.e. each subdirectory along the path, and the final filename) are limited to 255 characters, and the total path length is limited to approximately 32,000 characters. However, you should generally try to limit path lengths to below 260 characters ( MAX_PATH ) when possible."

So...don't rename your file!


这篇关于如何在使用允许的最大字符重命名EXE后解决CLR错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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