convert the vs project

  • Thread starter Thread starter great stuff
  • Start date Start date
G

great stuff

hi all,

can we convert visual studio 6.0 projects to other versions (say vs
2005 or vs 2008)

Does it work after converting. ??
 
great stuff said:
hi all,

can we convert visual studio 6.0 projects to other versions (say vs
2005 or vs 2008)
Sure.


Does it work after converting. ??

Maybe, maybe not. Even if it "works", that doesn't mean the code is
optimized.

When you attempt to open any project that was created in an earlier version
of Visual Studio, Visual Studio will launch the "Migration Wizard", which,
most people incorrectly assume, will "convert" the old code to the new
language's counterpart code. Nothing could be further from the truth. All
this wizard really does is create/modify the project and solution files so
that the code is assembled into the correct format for the version of Visual
Studio that you are now using. You may find that your actual code has had
"ToDo's" added, but very little, if any of your previous code will be
converted.

So, for example, let's say you had a VB 6 project, which used ADO to
interact with some data. That same code will be left alone and can, in
fact, be made to "work" in VB .NET. But, .NET provides new and improved
ways for connecting to and interacting with data and so, in reality, you
probably wouldn't want any of your old code. You'd want entirely new code
that uses the new approach.

The conversion wizard does not do this.

In short, the best approach is not to migrate code at all, but to rewrite.
Of course, that's not always feasible and so there is a lot of poorly
written VB 6 code still "working" in .NET.

-Scott
 
great said:
hi all,

can we convert visual studio 6.0 projects to other versions (say vs
2005 or vs 2008)

Does it work after converting. ??

About the wizard that Scott mentioned:
Well, it does convert the project. It's not only changing the file format. It analyzes
the code and outputs a new code file. For example, it changes the data types from
Integer to Short, Long to Integer. And it does a lot more. What it doesn't do is rewrite
the code if new concecpts make rewriting necessary. So it depends on what has to be
converted. I had a couple of dlls that could have been used almost without changes after
conversion. Other parts like graphics has to be rewritten completely.


Most important is: You should know _both_ versions of VB very well before converting projects.
 
What it doesn't do is rewrite the code if new concecpts make rewriting
necessary. So it depends on what has to be
converted.

True enough. But, unfortunately, VB .NET does have a vast amount of new
concepts that make doing a rewrite usually necessary.

-Scott
 
Back
Top