The formatting let you down. This is the code you are effectively executing:
The fix is to move Merge into one level up (into the Dir constructor)
Unfortunately the File constructor arguments validation routine has a bug, which leads to the malformed message:
The correct message should be: "Only WixSharp.FileShortcut, WixSharp.FileAssociation and WixSharp.ServiceInstaller items can be added to WixSharp.File"
The error message problem is corrected and the fix will be available in the next release.
new Project("SetupLettersDiagnostics", new Dir(@"%ProgramFiles%\test", new File(featureA, Path.Combine("", "nunit.exe")), ... new File(featureA, Path.Combine("", "Lib", "nunit-console-runner.dll"), new Merge(featureB, "MyMergeModule.msm"))));
Unfortunately the File constructor arguments validation routine has a bug, which leads to the malformed message:
"Only {0}, {1} and {2} items can be added to {2}"//instead of"Only {0}, {1} and {2} items can be added to {3}"
The error message problem is corrected and the fix will be available in the next release.