Project reference warning in module driver installer project (Gadgeteer Builder Templates)

Oct 8, 2014 at 8:57 PM
When I create a new project from the .NET Gadgeteer Module template (from Gadgeteer Builder Templates), the driver installer project is given a reference to the module driver project (actually, three references - one reference to each of the 4.1, 4.2, and 4.3 module driver projects). These references to module driver projects each generate the warning:

"The project '<blah,blah,blah>" cannot be referenced. The referenced project is targeted to a different framework family (.NETMicroFramework)."

I understand what the warning is saying, given that the referenced projects target NETMF, while the referencing project, the installer, targets .NET Framework 4, in this case.

Questions:

1) Are these project references required to be in the installer project?

2) If so, is there a way to suppress the warnings?

3) Would adding a reference to the DLL directly (instead of to the project) achieve the same goal without generating the warning?

Thanks.
Oct 9, 2014 at 8:33 AM
1) Yes, this is how it works in the WiX toolkit. Adding a reference to the project ensures the correct build order and sets required preprocessor variables.

2) While WiX itself supports suppressing warnings (if I remember correctly see project properties), I believe these unfortunately do not include the one in question as it does not come from WiX.

3) No, that wouldn't get you the preprocessor variables as project's target path, project's name etc.

Previously, a hack was used - the WiX project was a .NET Micro Framework project, building dummy assembly during compilation, and invoking WiX compilation process as a post-build process. That setup avoids the warning (and you can still do it that way), but it was mainly intended to enable WiX compilation on Express editions, is difficult to maintain across WiX versions and takes away all the capabilities of a regular WiX project. I consider the warnings to be much more cleaner solution. At the end they are valid, but irrelevant.

If I were to address this issue, I would try to look into the possibilities of following .NET Micro Framework in creating a VSIX deployment for the templates.
Oct 9, 2014 at 2:22 PM
Thanks for your reply. Very clear and complete. I will just live with the warnings.