Click here to Skip to main content
15,799,398 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I am using visual studio 2008. I am writting an addin for a piece of software (.dll). The people using the addin works in different platforms (different versions of this software in either x86 and x64 bits). The source code of my addin will be the same across all these platforms but the references attached to it will be different. What I would like to do is to build all different dll's in one shot. Now, I theorize that I can create multiple projects with all the correspondent references and include them within the same solution, what I dont know is how to share the same source between the different projects to make them compile at once... Does anyone have any experience doing this kind of thing? Any help would be appreciated.

You have to choose "Add as link" when adding the common source files if you want to share the same code between projects.
Share this answer
Once you have created your (blank) projects, just right click on the source folder, select "Add existing item", navigate to your common source file and press OK. The source file is now linked to your project ready to be built with project specific settings. You can also include or exclude specific portions of the source with #if #endif blocks and preprocessor definitions in the project settings.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900