Adding files starting with . is giving error

Jun 23, 2015 at 9:10 PM
I have used this way to add whole web publish but it seems if there is any file starting with .(dot), gives error.

new Files(@"..\OutFiles\WebPublish\*.*")
Jun 24, 2015 at 11:37 AM
Edited Jun 24, 2015 at 11:38 AM
If you don't need to deploy these files then use filter in the Files constructor.

If you indeed need them then you need to assign an explicit Id to such file (s) as the auto-Id will be based on the file name. And WiX doesn't like when it starts with it is dot. Have a look at ReleseFolder sample.

Most likely the following code will help:
//call it just befor BuildMsi()
project.ResolveWildCards(ignoreEmptyDirectories: true)
       .AllFiles.Where(f => f.Id.StartsWith("."))
       .ForEach(f => f.Id = f.Id.Replace(".", "_"));