views:

76

answers:

2

What do you do when you break compatibility on a common library used by many other libraries on your development machine?

What i usually do is:

For every dll that reference the broken one
 Checkout dll
 Checkout vbp project
 Open vpb project with VB6 Ide
 Click on References button 
 Uncheck MISSING reference and OK
 Click on References button 
 Check references and OK
 Click on Make dll
 Close project

This can be a pita activity, when you have many Dll to recompile and it can be error prone because you could miss some Dll. I think this problem is more related to development machine; on our staging\production server we have build tools that fix the MISSING problem automatically.

What's your best practice to handle this common scenario on your local machine?

+1  A: 

The Way We Work -- section Handle broken references is almost the way we work.

Here is a link to the tool by LJ Johnson -- Take Control of Your Build Cycle. We are using a custom build tools in our daily builds that reads separate DEF files.

wqw
Do you launch custom build script on your developer local machine too?
systempuntoout
No, I'm just getting latest in the morning from the nightly build. Then I usually set all vbp's to project compatibility (with a batch) because intellisense gets much faster in the IDE. I don't care if I'm breaking compatibility during the day because next build will fix "dropped" references automagically.
wqw
Ah ok but setting vbp to project compatibility presuppose that you have checked out every project.Do you develop alone?
systempuntoout
wqw
Thanks for your help.
systempuntoout
A: 

If you open the vbp with notepad then you should be able to update the reference without actually opening the project. Obviously you'll need to make sure you give it the correct CLSID.

pm_2
That's gonna be tricky :), thanks for your anwser anyway.
systempuntoout
Obviously, you don't have to do this manually, you could write a script to update the vpb, and then another to recompile it after.
pm_2
Yes you are right.How could the script know the CLSID of the broken dll?Do you have any example on how to recompile using a script?
systempuntoout
VB6.exe /m project should recompile for you.Can you not just feed the old and new CLSID values into the script?
pm_2
How do you get the CLSID of a specific DLL?
systempuntoout
You can look in the registry under HKEY_CLASSES_ROOT
pm_2