We have a Visual Studio 2012 project (C#) that uses multiple COM references. I am bringing it into Git and am having trouble figuring out how to handle the COM references. If I add the COM references in the typical way, (Add Reference -> COM tab -> Select my references), the following situation occurs:
Visual Studio adds a mention of the references in the *.csproj file which includes a GUID field and version field. From this, I take it that Visual Studio looks in the windows\system32 folder and finds the requisite DLLs at build time. On some development PCs, we have windows 8 and on others we have Windows 7 and it turns out that each version of Windows references different versions of COM DLLs. So, if I: 1) add the references on a Windows 8 PC; 2) commit the project to Git; 3) checkout the project on a Windows 7 pc; 4) attempt to build the project on the windows 7 pc -- the build fails. This is because the Windows 7 pc had different versions of the COM DLLs than are on the Windows 8 PC.
What is the best way to handle this situation? Should I manually copy the necessary COM DLLs into my project folder and version them in Git? If I do this, how would I handle updates that Microsoft makes to their DLLs? (Periodically check for difference in the windows\system32 folder?) And also -- which version would I copy into the project folder -- those that come with Windows 8 or Windows 7?