I noticed that I can add a reference not only to a DLL but also to an EXE in Visual Studio and access all classes in the EXE as it if were a DLL.
Is there any reason to create a DLL or can I just as well reference the EXE?
I am asking because I often write .net programs that I run both under Windows and under Mac OS and my usual solution is to create a DLL with the functionality and then two GUIs, one for each target.
However, it now seems to me as if I could just write a Windows version of my app and then add that Windows version (the EXE file) to my Mac project and reference the Windows EXE rather than a DLL. It also has the added advantage that I can run the Windows version from the Mac folder without adding another file.
Is there any good reason not to do it that way?
It depends on how much maintenance/update you would end up doing to the applications. I like the cleanliness of the original model, where the UI is separated based on platform, and the DLLs contain the classes that are shared. I would find it less confusing for maintenance/refactoring.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With