What is the maximum length of a string?

喜你入骨 提交于 2020-01-13 10:53:28

问题


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?


回答1:


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.

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:

  • split your description text into multiple custom properties
  • use these properties in your description instead of the actual text

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



来源:https://stackoverflow.com/questions/10089352/what-is-the-maximum-length-of-a-string

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!