0

I have a vb6 project when i try to upgrade it in .net 4.0, it shows some errors in references(i know that's obvious), they are like

The referenced component 'AxMSCommLib' could not be found.  
The referenced component 'AxOWC' could not be found.    
The referenced component 'ComctlLib' could not be found.    
The referenced component 'Microsoft.Office.Interop.Excel' could not be found.  

someone told me to install vb6 and find out those references and add them to .net project, i installed vb6 but i am still unable to find out those dlls ?

How to solve this problem, should i choose vb6 only if i want to extend this or is there any option for solving this problem ?

Mogli
  • 1,972
  • 11
  • 34
  • 67

1 Answers1

0

Migrating a VB 6 application to .NET takes a considerable amount of work. Usually less than a complete re-write, but still a fairly massive undertaking when dealing with a non-trivial application. So if you only want to make a minor change or two, then you should probably just stick with VB 6.

If you decide to go through with conversion, yes, you will need to install VB 6 in order to have access to those control libraries. But you probably don't want to continue using them. They are almost all ancient controls, replaced with newer and better options in the .NET Framework. For example, the System.IO.Ports.SerialPort class should now be used instead of AxMsCommLib. This is the "work" part that I discussed above.

The exception to this is the last one, which requires Microsoft Office to be installed. It's still the way you do Office interop in VB.NET.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • thnx for this info but one more thing i want to know that i had visual studio 2010 installed on my pc then i installed vb6 , in this scenario is it possible that two dll with the same name collision occurs ? – Mogli Apr 12 '13 at 06:53
  • because i found one dll and added to .net project as reference then i am getting this error- The primary reference "AxOWC" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. – Mogli Apr 12 '13 at 06:55
  • 1
    That's telling you that AxOWC is targeting version 4.0 of the .NET Framework, but your project is targeting version 2.0. You either need to find an older version of AxOWC, or change your project to target version 4.0 instead. – Cody Gray - on strike Apr 12 '13 at 07:02