SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Wix file name problem

Last post 11-06-2008 11:36 PM by j8me. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-12-2006 10:01 PM

    Wix file name problem

    Hi,

    if i import a file with a hypen in its name, i got a bunch of

    errors.

    It says the following: "The Component/@Id attribute's value, 'Cns11643-plane14So', is not a legal identifier.  Identifier's may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore. (CNDL0015) - C:\Dokumente und Einstellungen\Christian\Eigene Dateien\SharpDevelop Projects\Subversion\Files.wxs:117" 

     I think you only have to replace the "-" by a "_" or something else.

    Possible fix:

    File: WixDirectoryElementBase.cs

    Line: 101 

    Code: name = name.Replace("-", "_"); 

     

     

    BR

    /Christian
     

     

  • 10-13-2006 1:12 AM In reply to

    Re: Wix file name problem

    Thanks Christian, that's something I missed. It affects the component id and directory id generation which occurs when you import a directory. So if you have a file or a directory with a hyphen in it you get invalid ids on importing.

    There's code in the WixFileElement which generates correct ids which I think I'll extract and put in its own class. This class would then be used when generating ids for the component and directory.

  • 10-15-2006 7:07 PM In reply to

    Re: Wix file name problem

    Hi,

     The issue seems not to be fully solved.

    The "Name" attribute of the "File" tag has also issues with invalid characters!

     Message:

    The File/@Name attribute's value, 'ebcdic-it.so', is not a valid 8.3-compliant name.  Legal names contain no more than 8 characters followed by an optional extension of no more than 3 characters.  Any character except for the follow may be used: \ ? | > < : / * " + , ; = [ ] (space). (CNDL0027) - C:\Dokumente und Einstellungen\Christian\Eigene Dateien\SharpDevelop Projects\Subversion\Files.wxs:343

     

    BR

    /Christian
     

  • 10-15-2006 9:34 PM In reply to

    Re: Wix file name problem

    Thanks for reporting this bug. It should be fixed in revision 1908.
  • 09-05-2008 2:16 PM In reply to

    Re: Wix file name problem

    I have a similar issue. I have a few file names with chars which include "( ) , ." I have about 15 files getting this error during my build. ERROR: The File/@Id attribute's value, 'Avery_5162,_5262_(Letter_1_33_x_4_00)_doc', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.
    It the simple answer to change the name of the files? or Is there another work around?
    Note: I had Votive - Windows Installer XML (WiX) Toolset, Version 3.0.4318.0 installed, using VS 2008.
    Thanks,
    Jason
    Thanks,

    Jason
  • 09-06-2008 10:34 AM In reply to

    Re: Wix file name problem

    I would just replace the invalid characters in the File/@Id attribute with something else, say an underscore. The Id value can be anything, it doesn't need to be the same as the filename.
  • 11-06-2008 11:36 PM In reply to

    • j8me
    • Not Ranked
    • Joined on 11-04-2008
    • Posts 1

    Re: Wix file name problem

    I ran into the same problem and I discovered what was happening.

    Here's what I had:

    <File Source="7-zip32.dll" KeyPath="yes" />

    The reason this was failing was because if you don't specify the 'Id' attribute for the 'File' tag it defaults to using the filename portion of the 'Source' attribute which in this case contains illegal characters.

    To fix this you can explicitly set the 'Id' attribute like this:

    <File Id="id_6847C04E" Source="7-zip32.dll" KeyPath="yes" />

     

    Jaime

Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.