-3

My company is looking to upgrade/convert an old VB6 application into the .NET framework. After some research, the best option seems to be to use Visual Studio '08 and run the "Upgrade Wizard" when opening the project. When I try to do so, I am given the following prompt:

Error Prompt

After consulting Google for a bit, I have downloaded a copy of this file, and I have tried to put this .ocx file in multiple different locations to try to get this work.

Is it ok for me to just download a copy off of an external source? (i.e. https://www.solvusoft.com/en/files/missing-not-registered/ocx/windows/rational-software-corp/rational-rose/vsocx6-ocx/)

More importantly, what would be the right location for me to put this .ocx file in order to make this work? I just want the upgrade wizard to run properly, but I can not without having this file in it's appropriate location. I am very knew with VB, so any help regarding this will be extremely helpful.

  • 1
    Please do not post images of code or errors but include them in your question. – Capricorn Jun 26 '18 at 21:17
  • 3
    While I've never upgraded a VB6 either way, most people I've spoken to who have would suggest that simply rewriting in VB.NET is a better overall approach. The problem with using the upgrade wizard is that you end up with something that needs so many changes to become good VB.NET code that you end up doing more work in the long run, unless you're happy to end up with a bit of a half-baked end product. It also means that making architectural improvements or using features that just weren't available in VB6 is harder. – jmcilhinney Jun 27 '18 at 01:25
  • 1
    The best option is to re-write this, trust me. An upgrade will cause headaches and when re-writing you can take the approach to start in the latest .NET framework utilising the latest features. – Bugs Jun 27 '18 at 13:04

1 Answers1

1

The best option seems to be to use Visual Studio '08 and run the "Upgrade Wizard" when opening the project.

Well, that's certainly an approach that some people have had success with as a starting point, but don't expect it to solve all your problems with migrating a codebase that you're not familiar with to a new platform. It can update the syntax of many things so that it can compile in VB.NET, but that's really all it can do.

Is it ok for me to just download a copy off of an external source?

Well, I'm not sure what you mean by "ok". I certainly wouldn't want to run code on my system that I randomly found on the Internet on a site as sketchy as that one. Even if it was a real copy of the component I needed and didn't have malware attached, I wouldn't know if it was actually the same version as what the application had been testing and running with. I don't know anything about that particular component, but it may also be a violation of the licensing agreement from when your company bought that component.

If you really need to just find the file rather than finding the installer from when you initially acquired the component, I'd think you would want to get the copy from the system that's currently being used for development, or (if there isn't a development system set up anymore) a copy that's currently installed wherever the application is being run. Some components require more than just the .ocx file in order to run, however.

What would be the right location for me to put this .ocx file in order to make this work?

Well, generally the installer for a component will register it for you. For many components, as long as it doesn't need any other files you can pretty much put it anywhere as long as you register it. Registering it yourself, if you have to, can be done with regsvr32, or you can browse to the file within the Components dialog box in the VB6 IDE.