Re: problem porting vb dev apps to new computer

From: Ken Halter (Ken_Halter_at_Use_Sparingly_Hotmail.com)
Date: 05/11/04


Date: Tue, 11 May 2004 15:13:28 -0700

Beemer Biker wrote:
> I just got my computer upgraded and i am having problems rebuilding all
> my projects. Obviously I cannot just drag and drop all my projects to
> the new computer.
>
> 1. On the new computer, I installed the enterprise edition VS6 + SP6
> plus all the other licensed 3rd party stuff, everything except my
> applications.

Hopefully, you're aware of the SP6 issues (this group + the bugs group
are full of SP6 related issues.. a couple of them are pretty bad but
others just need some manual permissions tweaks to get back on track)

> 2. Using network neighborhood i copied and pasted all my projects
> "c:\pvcswork\projects\..." bunch of com projects and vb projects that
> are all inter-related.
>
> 3. I then tried rebuilding my "vb group", a basic group of
> applications, custom forms, etc that depend on one another plus some com
> objects that are created by Visual C. I got so many error messages just
> trying to load the VB project group it was pathetic. I didnt even
> attempt to build anything.

Hope you didn't save the project after getting those errors 'cause VB
replaces missing ocx's with pictureboxes.... anyway, all dependancies
need to be registered.

> It would appear I will have to first run regsvr32 to register the dll's
> created by the "C' project, then do the same for all the ocx from the
> custom forms?

All ocx's/dll's that you've created will need to be registered before
anything will work. That includes loading projects that rely on those
components. ocx's turn into pictureboxes and missing dlls turn into
(MISSING) items in the references (not sure how they're saved).

> Alternately, I can just rebuild all the dll's which then registers them
> for me, then do the same for the ocx?

That'll work.. to keep them binary compatible with your old builds, the
components will need to be present (registered is optional).

> How can i avoid something like this in the future? How can i arrange so

backup all projects and the components you build with those projects and
restore them to the new computer. Registering components is quick and
easy if you have the right tools. If you take the steps outlined in the
tip below, you can select any number of dlls or ocxs in windows
explorer, right click and hit Register.

Register and unregister components with context menus
http://www.devx.com/vb2themax/Tip/18337

as written, the tip supports multiple ocxs >or< dlls (no mixing types).
A quick edit with make it support multiple ocxs >and< dlls (ok to mix).

> that (for example) if I check out a project from source-safe or pvcs on
> a totally clean system with VS6 that the ocx get built before the parts
> of the project that use the ocx get loaded. Right now, when I bring up
> the VB group project, the loads fail "dim xxx as yyyy " because yyyy was
> not registered as it needed to be built before the form haveing that
> declaration gets loaded.

I *never* build as part of a group. I build a single project at a time
in reverse dependancy order (example: dll A needs dll B so dll B is
built before A). I've just never need to "build everything" I usually
change only one thing (before testing) so I rebuild only one thing.

> Any ideas on a makefile to do this or is there another way? I can get
> the VB deployment wizard to put together an install package for the
> target systems. Is there something like that for the development to
> insure all the stuff gets built in the correct order?

There are a few tools (never tried them). Here's one that was published
in VBPJ a while back... (still better (imo) to build a single component
at a time but....)

Take Control of Your Build Cycle (VBPJ, December 2000)
http://www.mvps.org/st-software/VB_Code_LJ.htm

-- 
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..


Relevant Pages

  • Re: How do we instal ocx files?
    ... ActiveX components (dlls and ocx's for the most part) need to be registered. ... register them. ... System32 folder and tell windows to open that ocx with Regsvr32.exe (be sure ...
    (microsoft.public.vb.general.discussion)
  • Re: Registering .dll and .ocx files
    ... Actually, Using the vb Dependency Walker app, I've realized only the .ocx ... files I want to register have the DllRegisterServer() and the .dlls do not. ...
    (microsoft.public.vb.winapi)
  • problem porting vb dev apps to new computer
    ... I just got my computer upgraded and i am having problems rebuilding all ... It would appear I will have to first run regsvr32 to register the dll's ... then do the same for all the ocx from the ... a totally clean system with VS6 that the ocx get built before the parts ...
    (microsoft.public.vb.general.discussion)
  • Re: Windows forms app copied from Release/bin folder to another folder does not run.
    ... As I understand it, I would only need to register the DLLs using RegAsm if I were going to access any of my classes from COM clients, which I don't think I am, the whole application is pure .NET. ... > built, it runs fine from the folder that it's built into but if I ...
    (microsoft.public.dotnet.general)
  • Re: DLL or OCX
    ... >I stick with DLLs. ... >>As I understand it, when you make OCX file, you make a component ... @Tom - yes - but you can also have Forms in an OCX ... you don't have to register them to use ...
    (comp.lang.basic.visual.misc)