You can "link" a code file between two or more projects. Just Right click your project, choose Add -> Existing item
, and then click the down arrow next to the Add button:
In my experience linking is simpler than creating a library. Linked code results in a single executable with a single version.