Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-27-2003, 04:15 AM
a_t_jackson a_t_jackson is online now
Registered User
 
Join Date: 03-11-2003
Location: Belfast, Northern Ireland
Posts: 23
VB projects and component references

This is more of a VB issue but is affecting our Visual Build process...

We have a team of developers working on a VB app that comprises a number of VB components. All components are rebuilt as part of the build process for the main project. We register each component on the build machine as it is built.

It seems that a VB project file (.vbp) stores the path of any components that a project uses. When a developer opens this file in their VB IDE these paths seem to get automatically updated to the location of those components on the developer's machine (VB must read the system registry to do this).

This means that Developer1 might check-in a .vbp containing component paths specific to their machine. When Developer2 then does a GetLatest on this project and opens .vbp in their IDE the paths get autmotically updated to match the COM registration information on their machine. So no problem, Developer2 can still compile the project.

Unfortunately though, Visual Build doesn’t use the VB IDE and so the paths never get automatically updated. This means that the VB compiler on the Visual Build machine attempts to use the paths that were set by the last developer to check-in the .vbp file. If the paths are different the action fails.

This is causing us a lot of problems and so I am wondering if their is anyway to force the Make VB6 action to either update the paths or allow specific paths to be defined for component?
Reply With Quote
  #2  
Old 07-01-2003, 12:04 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The path to a reference is only a hint; the VB6 compiler will actually resolve the reference by looking up the reference typelib GUID in the registry, so as long as the component containing the matching typelib has been registered, it will be able to find it even if the hint path is incorrect.
Reply With Quote
  #3  
Old 07-01-2003, 12:29 PM
a_t_jackson a_t_jackson is online now
Registered User
 
Join Date: 03-11-2003
Location: Belfast, Northern Ireland
Posts: 23
Really??

These are the steps to reproduce and workaround the problem:

Step 1. Run a VisualBuild script that attempts to compile MyProject.vbp. It fails and reports that it can't find a component.

Step 2. Imediately open MyProject.vbp in the VB IDE and compile. This time it will compile successfully. At this point MyProject.vbp has also been updated to point to the correct location of the registered components it uses.

Since I've not performed any re-registration of components between Steps #1 and #2 doesn't it imply that its the file locations in MyProject.vbp that are used by the command line compiler?

Also if I check-in MyProject.vbp after step 2 and re-run the VisualBuild script it compiles successfully. Again, no re-registration of components.
Reply With Quote
  #4  
Old 07-01-2003, 02:14 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
That's really weird. I tried completing removing the filename in the reference to SecondVB in the FirstVB.vbp sample project (Samples\VStudio\orig\Source\FirstVB) like so:

Reference=*\G{287F3C8B-089A-11D4-A442-444553540001}#1.0#0##SecondVB

then registered SecondVB.dll and ThirdVB.ocx (the 2 external references the project has), built FirstVB.vbp from a Make VB6 action, and it built successfully. (It also worked with a bogus filename in the reference line.)

I have no idea why it doesn't work for you. Is the error coming from the VB compiler or the Make VB6 action (check the 'show command-line' checkbox on the Options tab, rebuild, and post the build log)?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:40 PM.


Copyright © 1999-2023 Kinook Software, Inc.