Take the 2-minute tour ×

I keep losing references to our DLLs anytime I rebuild our entire source directory. Our projects have multiple DLL projects which some use COM and others are just .Net DLLs.

I have a batch script that compiles each project in order and copies the built DLLs into System32 and either registers them or just places them there. I first unregister the original DLL and then register the new one in its place.

My question is, when I build the directory almost all the VS 2008 (VS9) projects lose references to some of the DLLs that were built before it, why? Those projects have not actually changed code-wise. Also when I go to re-add some of those references I get multiple COM enteries for System32 (mostly) and some from the release folder that they were built in and I'd love to clean them up too.

I read here that I can add the debug entery so that will alert us that a reference is messed up when we work (and not pass on the issue to others) but that is not a real solution. Only a bandaid.

I also read (no link lost the page, sorry) that if anything changes within a DLL (not the interface) that VS9 will lose the reference because the DLL isn't a perfect match. We have done some DLL work (not in the DLL I was referencing above) and that could be relevent but I don't see how since the path the IDE is pointing to is System32 and the file is present.

Sorry if this has actually been answered before, because I've been using my Google-fu with little to no results.

share|improve this question
Look in the project file for the reference. Verify if it specifies the <Guid>, check if that guid is stable from one build to another and that it is actually registered when you open or build the project. –  Hans Passant Oct 2 '12 at 15:15
The only change to the reference was the path nothing about a GUID <Reference Include="MyDLL, Version=, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\..\Windows\System32\MyDLL.dll</HintPath> </Reference> Do you mean the GUID within the IDE of the DLL? (as in should I look at the DLL project rather than the project referencing it? Edit: Because I'm dumb... –  JGalarza Oct 2 '12 at 15:49
add comment


Your Answer



Browse other questions tagged or ask your own question.