简体   繁体   English

用于将vb6应用程序转换为C#的升级程序

[英]upgrade program for converting vb6 app to C#

What is the best pathway to achieve this? 实现这一目标的最佳途径是什么?

I know that VS2005 contains an upgrade mechanism. 我知道VS2005包含升级机制。 Do any later versions of VS contain this? VS的更高版本是否包含此内容?

Microsoft has devoted a site to VB6->.NET migration . 微软已经将一个站点用于VB6 - > .NET迁移
They recommend a Free tool from ArtInSoft. 他们推荐使用ArtInSoft的免费工具

However I'm not sure I'd like to maintain a .NET application written in VB6-style. 但是我不确定我是否想维护用VB6风格编写的.NET应用程序。 But on the other hand a tool could give you a good start and you can refactor the result where the tool does not produce code of your liking. 但另一方面,工具可以为您提供一个良好的开端,并且可以在该工具不产生您喜欢的代码的情况下重构结果。

In the latest release of Visual Studio, the VB6 Migration wizard is now missing from the IDE. 在最新版本的Visual Studio中,IDE现在缺少VB6迁移向导。

A good external tool to perform a migration is VBUC . VBUC是执行迁移的一个很好的外部工具。

One way to do this, which was used successfully in one of my previous teams, is:- 在我之前的一个团队中成功使用过的一种方法是:

  1. use the free Microsoft tools for upgrading from VB6 to VB.NET (eg http://msdn.microsoft.com/sv-se/vbrun/ms788233 ) 使用免费的Microsoft工具从VB6升级到VB.NET(例如http://msdn.microsoft.com/sv-se/vbrun/ms788233
  2. compile the resulting code into assemblies 将结果代码编译为程序集
  3. decompile the assemblies into C# using a tool such as .NET Reflector, ILSpy, etc. 使用.NET Reflector,ILSpy等工具将程序集反编译为C#。
  4. cover the code in unit tests 涵盖单元测试中的代码
  5. refactor until the code is managable (the initial code is likely to be quite ugly) 重构,直到代码可管理(初始代码可能非常难看)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM