I have a file named 0001_CreateTables.sql. It starts with a number because the scripts need to be applied in order.
In the latest version of Wixsharp, I get the following error.
D:\Development\Bitbucket\connexion\Connexion.Setup.WixBA\bin\Debug\Connexion.15.0.5443.wxs(654) : error CNDL0014 : The File/@Id attribute's value, '0001_CreateTables.sql_1645679536', 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.
The wix entry looks like this:
<Component Id="Component.0001_CreateTables.sql_1645679536" Guid="2edfc367-ad84-4f6a-827e-ee0286d77105">
<File Id="0001_CreateTables.sql_1645679536" Source="Connexion.Database\Connexion\runAfterCreateDatabase\0001_CreateTables.sql" />
</Component>
Apparently msi doesn't like the first character in the identifier to be a number.
Hello Oleg,
Thanks for having a look at this bug, and as always for the great library.
I was reviewing your change, and I don't think it covers all the cases. For instance, some could add a file:
(foo).txt
I think there are many other cases with unicode characters, so it might be better to check that the first character is between a-z, or A-Z, since that is what msi seems to want.
Just a thought
@oleg-shilo never mind I see that the other characters are checked else where. Sorry for not looking more thoroughly.
馃憤
I am experiencing the same issue with WixSharp 1.6.1.
Is there a workaround for this issue with WixSharp 1.6.1 while we are waiting for the new release?
Or maybe there's an earlier version which does not have this issue?
I rolled back to v1.5.0 which does not have the issue
Sorry. I wasn't aware this issue was so waited bay many.
Compiler.AutoGeneration.LegacyDefaultIdAlgorithm = true;. I am aiming the new release to be available today.
@oleg-shilo - you are the best!
The LegacyDefaultIdAlgorithm approach worked for me -- I will use that until the new release comes out.
Thank you for a great library!!
It is a true lifesaver 馃