问题
I want to open a program (written in Visual basic 6) to be open in Visual Studio.net. Please guide, how could I do that?
While trying to open VB6 (.vbp file) program directly from the OPEN project option in visual studion.net, I was getting this error,
"Visual Basic 6 (.vbp) files cannot be opened in Visual Studio"
回答1:
I am trying to open in VS 2010.
Visual Studio 2010 does not support VB6 projects. See the link here
From the msdn documentation:
Visual Studio 2010 does not provide tools for upgrading applications and projects from Visual Basic 6.0. If you want to upgrade your project from Visual Basic 6.0 to Visual Basic 2010, you can use the upgrade tools provided with earlier versions of Visual Studio and then upgrade the project again in Visual Studio 2010.
回答2:
Speaking from my Experience, its not easy to open a Visual Basic 6.0 project in any Versions of Visual Studio above 2008.
Although 2008 and below version provide an automatic function to convert Vb6 code to VB.net framework. But the problem starts after the conversion, it Skips some code, add function/variables on its own, or modify the functional behavior on its own, with it the VB.proj will be created with error and you will not be able to open it anywhere as solution file. 3rd party tools also the same.
If you want to open the VB6 code try Visual Basic 6.0 Portable edition. But headache will still follow you there, please refer this link Installation of VB6 on Windows 7 (or Windows 8) (or Windows 10)
回答3:
There's a plugin called Visual Basic Tools for Visual Studio that provides the following features:
load classic VB workspace- and project-files and offers quick access to the extension´s options
integrates with the solution explorer and the code editor having support for syntax highlighting, basic outlining (allows to expand/collapse methods, properties and types) as well as navigation bar support.
Classes, Types, Modules, Forms and Controls can be inspected using the Object Browser and Class View.
From the reading, it's unclear if you can actually build the project, though it does say:
The import tool creates a new solution and MSBuild compatible projects.
回答4:
Make sure you are clicking on the project file itself... Right click on the file and select "Open With" and select your visual studio program. It may need to be converted and if so, it will prompt you to convert the project.
Thanks!
回答5:
Download Visual Basic Tools for Visual Studio,allows to work with classic VB workspaces and projects
来源:https://stackoverflow.com/questions/14329954/how-to-open-visual-basic-6-program-with-visual-studio-net