Migration from Visual Studio 6.0 to .NET

  • Thread starter Thread starter Jordan Piperkata
  • Start date Start date
J

Jordan Piperkata

Does any one have expirience with migrating a Source Code written in Visual
C++ 6.0 to .Net C++.
Is it possible? Is it worth to try at all? What about unmanaged and managed
code? Known problmes etc.

If there is some kind of compiler or a tool i'll be very happy :)
 
There are certainly tools to help you migrate from VB6 to VB.NET, so I would
imagine there must be something to help with C++, have you searched
Microsofts MSDN site?

We converted some code from VB6 to VB.NET some time ago, and I would say
80-90% was easy/automatically converted. the remainder was a pain in the a**
and mostly needed to be re-written.

There is probably not a lot of point in my going into too much detail as
your experences with C++ may differ greatly to ours with VB.

Good Luck!

Chris.
 
Jordan said:
Does any one have expirience with migrating a Source Code written in Visual
C++ 6.0 to .Net C++.
Is it possible? Is it worth to try at all? What about unmanaged and managed
code? Known problmes etc.

If there is some kind of compiler or a tool i'll be very happy :)
I did it not too long ago, i started a .net framework based managed c++
project and added non managed c++ cpp and h files to it. The only thing
that didn't work was using precompiled headers which i switched of by
the compiler switch (i think its possible to do for only those files
rather than for the whole project as well but i didnt care).

If you want to read values from input controls you allways need to use
their cast methods (*) in order to write them to your unmanaged types
which can look a bit messy but its not a real problem.

I didnt have any more problems than this, and i used no tools besides
..net 2003.

(*) for example: double unmanaged_double =
System::Decimal::ToDouble(managed_double);
 
Jordan Piperkata said:
Does any one have expirience with migrating a Source Code written in
Visual
C++ 6.0 to .Net C++.
Is it possible? Is it worth to try at all? What about unmanaged and
managed
code? Known problmes etc.

If there is some kind of compiler or a tool i'll be very happy :)
As far as straight migration is concerned, you'll probably find fewer
problems than the VB folks encounter (reference Chris' reply). I've been
able to convert small to medium MFC and console applications simply by
double-clicking the .dsw file with VS.NET 2003 installed and allowing the
automatic conversion process to take place. Depending on the age of the code
to be converted, and its adherence to current standards, you may encounter
issues requiring manual intervention. For example, if references to
iostream.h and some other old .h headers exist, they will have to be brought
up to date.
Please note that noting above implies an automatic conversion from unmanaged
to managed code. I'm not aware of any tool which does that.
 
Back
Top