DLLs and Compiler Directives
-
I hope this explains my problem. I have two versions of a program, not basically very different, a 'standard' and a 'pro' version that are controlled using compiler directives. My problem is that the 'standard' version uses one DLL and the 'pro' version uses a different one completely, by a different vendor. Basically zedgraph and spreadsheetgear respectively. I don't particularly want to send both to both versions of the program but I can't seem to see a method using compiler directives (?) of having one reference for one and the different reference for the other. This also extends to the setup and deployment program as that also seems to only relate back to the project assemblies as far as debug/release are concerned and does not allow for different file sets, or have I missed something?
-
I hope this explains my problem. I have two versions of a program, not basically very different, a 'standard' and a 'pro' version that are controlled using compiler directives. My problem is that the 'standard' version uses one DLL and the 'pro' version uses a different one completely, by a different vendor. Basically zedgraph and spreadsheetgear respectively. I don't particularly want to send both to both versions of the program but I can't seem to see a method using compiler directives (?) of having one reference for one and the different reference for the other. This also extends to the setup and deployment program as that also seems to only relate back to the project assemblies as far as debug/release are concerned and does not allow for different file sets, or have I missed something?
You can have references to both DLLs in the same project. The compiler will not add the dependency reference if none of its members are used by your code. So it doesn't create any problem, you see. And regarding Setup & Deployment, you have to create two different setup projects for your Standard and Pro versions.
-
You can have references to both DLLs in the same project. The compiler will not add the dependency reference if none of its members are used by your code. So it doesn't create any problem, you see. And regarding Setup & Deployment, you have to create two different setup projects for your Standard and Pro versions.
Many thanks indeed for that. I did not realise that the reference would not be created if the DLL was not used. Two setups is not a problem. Gave you a 5 for that one! :)
-
Many thanks indeed for that. I did not realise that the reference would not be created if the DLL was not used. Two setups is not a problem. Gave you a 5 for that one! :)
-
Even if any Type in your dependency is used in your code, the assembly is not loaded at the time of starting the process itself; it is loaded only at the point where any of its Type is first used.
Thanks again. Just one final question, does this also apply to Forms in the project, i.e. if a form is not referenced in code because of the compiler directives it does not get assembled into the exe?
-
Thanks again. Just one final question, does this also apply to Forms in the project, i.e. if a form is not referenced in code because of the compiler directives it does not get assembled into the exe?