Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: A few newbie questions

$
0
0
Hi Pavel,

It isn't a bug. I have modified your code a little so I can run it. I also added the output to verify that the wildcard path works OK:
project.ResolveWildCards()
       .AllFiles
       .ForEach(f =>Console.WriteLine(f.Name));
An this is the output:
Files\ServiceHost\DB.config
Files\ServiceHost\Service.Host.exe.config
Files\ServiceHost\Service.Host.exe
E:\...\Support\Services\Files\ServiceHost\readme.txt
E:\...\Support\Services\Files\ServiceHost\Service.Host.exe
Clearly the wildcard exclusions didn't work as expected. This is because the exclusion masks are applied for the whole file path not just name name. Thus the following small change fixes the problem:
new Files(svcFeature, @"Files\ServiceHost\*.*", new[] { "*Service.Host.exe", "*.config" })
The test also revealed that ResolveWildCards creates the mixture of absolute and relative paths. There is nothing wrong with this but I will change it for the next release to produce consistent file set.

BTW the the use of exclusion mask has been marked as obsolete, however I just missed the constructor that you used. Otherwise you would get a nice warning and advice to use predicate instead. Which is more intuitive comparing to the mask:
new Files(svcFeature, @"Files\ServiceHost\*.*", f => !f.EndsWith("Service.Host.exe") && 
                                                     !f.EndsWith(".config")),
You can find the whole adjusted solution here.

As for the service dependencies WiX allows expressing dependency via ServiceDependency element. Wix# does not support it directly so you will need to inject it as in the InjectXML sample. But... I think it is a useful feature and I am going to add it to the next release (in a day or two).

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>