Search code examples
vb.netvisual-studioprojectupgrade

VS 2019 - how to upgrade Visual Basic .NET projects


I am dusting off a number of old projects that we have in production and would like to upgrade the vbproj files to the latest version. Currently, ToolsVersion="12.0". New projects created in VS 2019 are using 15.0. My current projects have been repeatedly updated since something like VS 2003. However VS 2019 is not offering to upgrade them further. Although maybe I am missing something.

I plan to set up a side-by-side environment so I can use the designer content. I would really like to begin with project versions that are up-to-date. These current projects have been repeatedly updated since something like VS 2003.

A cursory review shows that the vbproj content is quite different. Is there a recommended way to upgrade? One alternative would be to create new projects using current templates and copy the source over. But there are about 32 projects that include WinForms, Web and class library projects and that's a big task. Another approach would be for me to manually merge the old and new vbproj files, something I am not sure I can safely do.

Any ideas?


Solution

  • VS 2019 - how to upgrade Visual Basic .NET projects

    In fact, you have missed too many versions of VS and this document shows that VS2019 will not allow to upgrade VS2003 project directly.

    Because there are too many different versions, there have been great changes from the project structure to the construction mechanism to various details, and some have even been removed from the new version VS.

    The safest way is to upgrade the project step by step(a version by a version), but it is not unreality since VS2005, VS2008 are no longer maintained by Microsoft.

    Or you can try upgrading your project step by step with VS2010 directly as an intermediate, but due to the large gap between the two, there will be various upgrade errors. And there is no such tool or easy approach to upgrade directly.

    Actually, the best way is just creating new projects in VS2019 and then migrate your old project content into your new projects.

    This is certainly much clearer and easier than if you were to correct errors in more than 30 projects later. And old projects with a gap of 16 years are worth the time it takes to re-create and migrate them in vs2019, which will take a long time but save you unnecessary and tedious errors.

    In addition, do not forget to make a backup just in case.

    Hope it could help you.