字符串的最大长度是多少? [英] What is the maximum length of a string?

查看:46
本文介绍了字符串的最大长度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我light我的项目时,我收到以下警告:

When I light my project, I get the following warning:

C:\Users\me\wix\service.wxs(105) : warning LGHT1076 : ICE03: 
          String overflow (greater than length permitted in column); 
          Table: ServiceInstall, Column: Description, Key(s): ServiceRegister

我的描述很长,但在我开始修剪它之前,允许的最大长度是多少?

My Description is quite long, but before I set out to trim it down, what is the maximum length permitted?

推荐答案

ServiceInstall 表中的 Description 列具有 Formatted 类型,因此从技术上讲,它没有限制.你可以使用任何你想要的长度.

The Description column in ServiceInstall table has the Formatted type, so technically it doesn't have a limit. You can use any length you want.

显示警告是因为您当前的文本超过 255 个字符(Windows 中的标准最大文本长度).这只是一个警告,而不是一个错误.它不会影响您的安装.

The warning is displayed because your current text exceeds 255 characters (standard maximum text length in Windows). It's only a warning, not an error. It doesn't affect your installation.

不过,如果您想避免警告,解决方案是使用安装程序属性:

Still, if you want to avoid the warning, a solution is to use installer properties:

  • 将您的描述文本拆分为多个自定义属性
  • 在描述中使用这些属性而不是实际文本

这样一来,长文本将在安装过程中得到解决,并且它的长度不会触发任何警告.

This way the long text will be resolved during install and it's length won't trigger any warnings.

这篇关于字符串的最大长度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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