Porting BIG VB6 project to VB.net

Michael Levkovitch 20 Reputation points
2023-09-13T20:34:47.6533333+00:00

I have VB6 project with about 150,000 code lines that controls sophisticated automatic/manual calibration system. The system hardware was recently updated and some of the hardware drivers does not support any more VB6 32 bit applications.

The whole calibration software package include 22 applications including 3 data acquisition programs, data bases applications and data reduction and analysis applications. I designed the system and wrote all the code.

I consider now to rewrite the one problematic data acquisition calibration program in VB.net 2022 to solve the 32 bit issue.

This program has about 80,000 lines of code and use about 100 routines located in the project main library. These routines are also used in the other applications. Obviously, each library routine include several related procedures (subs and functions).

As I understand, in VB.net solution, to keep this structure, each library routine, saved in the library folder, must be "project" since other approach merge the classes and/or modules to the "master" project folder. So, I have to convert the 100 library routines to 100 projects. Am I right?

Where can I find some explanations and recommendation how to approach to this project. Some detailed template how to call routines and variables between tens of projects in one solution will be very helpful as well.

Thanks.

Developer technologies | VB
{count} votes

Accepted answer
  1. KOZ6.0 6,655 Reputation points
    2023-09-13T22:27:41.38+00:00

    You can prevent source files from being merged into your project.

    「Visual Studio – Share files between multiple projects」

    https://makolyte.com/visual-studio-share-a-file-between-multiple-projects/

    When using VB6, We struggled with ActiveX.dll compatibility, but after using .NET, things got easier.

    I think it's better to consolidate the shared sources into one library.

    Sorry if my English is weird.


1 additional answer

Sort by: Most helpful
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2023-09-14T03:27:41.4233333+00:00

    Hi @Michael Levkovitch ,

    In a VB.NET project, you typically organize your code into classes. You can create class libraries (DLLs) to encapsulate related functionality. Each class can have multiple methods (subs and functions).

    You might not need to create 100 separate projects. Instead, consider grouping related classes into a few class library projects.

    How to: Add or remove references by using the Reference Manager

    Best Regards.

    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.