C# Visual Basic 6.0 的转换工具比较
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/718780/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Conversion tool comparisons for visual basic 6.0
提问by kHyman
Has anyone here used either of the following (or any other tool) to convert your vb6 code to a .net language?
这里有没有人使用以下任一(或任何其他工具)将您的 vb6 代码转换为 .net 语言?
Artinsoft's upgrade companion(converts to c# and vb.net)
Artinsoft 的升级伴侣(转换为 c# 和 vb.net)
vbmigration partner(converts to vb.net)
vbmigration 合作伙伴(转换为 vb.net)
How effective were they and what size project did you convert?
它们的效果如何?您转换了多大的项目?
How much work was left to do afterwards? How happy are you with the resultant .net project. What was the support like? Is there a support forum anywhere for users of tools like these, neither vendor seems to offer one.
之后还有多少工作要做?您对由此产生的 .net 项目有多满意。支持是怎样的?是否有任何地方为此类工具的用户提供支持论坛,似乎两家供应商都没有提供。
What did they charge, their prices are not published and I have heard wildly differing prices from different sources for both the above examples
他们收取了什么费用,他们的价格没有公布,我听说以上两个例子的不同来源的价格差异很大
采纳答案by MarkJ
I think you've already seen the questionabout tools for migrating VB6 to VB.NET.
我想您已经看到了有关将 VB6 迁移到 VB.NET 的工具的问题。
Both have published special offer prices for the UK market on their basicproducts on this Microsoft UK page. Of course you need to know the limitations of the basic products and the prices for your market to make a realistic judgement, so you probably do need to contact them :(
两家公司都在此 Microsoft UK页面上针对其基本产品发布了针对英国市场的特价。当然,您需要了解基本产品的局限性和您所在市场的价格才能做出现实的判断,因此您可能确实需要与他们联系:(
- Artinsoft Upgrade Companion Developer Edition £199for up to 50,000 lines of code. EDITNow offering a free versionthat can do up to 10,000 lines of code.
- Code Architects' Visual Basic Migration Partner Professional Edition £399. They told me this was also for up to 50,000 lines of code.
- Artinsoft 升级配套开发者版£199,最多 50,000 行代码。编辑现在提供一个免费版本,最多可以执行 10,000 行代码。
- Code Architects 的 Visual Basic 迁移合作伙伴专业版£399。他们告诉我这也适用于多达 50,000 行的代码。
The built-in Microsoft upgrade wizard is pathetic - according to the guy who wrote it- of course he is from Artinsoft so he wants to sell you something better. Microsoft UK also saythe Artinsoft and Code Architects tools are better than the built-in upgrade wizard.
内置的 Microsoft 升级向导很可悲——据编写它的人说——当然他来自 Artinsoft,所以他想卖给你更好的东西。Microsoft UK 还表示Artinsoft 和 Code Architects 工具比内置升级向导更好。
EDIT: I contacted Code Architects for a quote, they responded very fast. Unlike this Stack Overflow questionby Angry Hackerwho had a worse experience. But then Francesco Balena popped up on Stack Overflow to answer his question within 12 hours, which is more encouraging.
编辑:我联系了代码架构师以获取报价,他们的回复非常快。与此堆栈溢出问题被愤怒的黑客谁了糟糕的经历。但随后 Francesco Balena 出现在 Stack Overflow 上,在 12 小时内回答了他的问题,这更令人鼓舞。
回答by rjrapson
I haven't used either of the tools mentioned, but with a little preparation, the upgrade tools in Visual Studio are more than adequate.
上面提到的任何一个工具我都没有使用过,但只要稍加准备,Visual Studio 中的升级工具就足够了。
The first thing you need to do is get the Visual Basic 6 Code Advisorfrom Microsoft. It's a great help in getting your project ready for migration.
您需要做的第一件事是从 Microsoft获取Visual Basic 6 代码顾问。这对于让您的项目为迁移做好准备非常有帮助。
回答by Marc Gravell
"updrading" VB6 to .NET is a misnomer. All you get is VB6 code in .NET; generally you can get much better results with a refactor/re-architecture - using a different class model, for example. Perhaps designing to be unit-testable, for example. Or using IoC.
将 VB6“升级”到 .NET 是用词不当。你得到的只是 .NET 中的 VB6 代码;通常,您可以通过重构/重新架构获得更好的结果 - 例如,使用不同的类模型。例如,也许设计为可进行单元测试。或者使用 IoC。
If you just want the code to work (and you're confident you can test it), then fine.
如果您只是想让代码工作(并且您有信心可以对其进行测试),那么没问题。
Personally, I would seriously consider a more manual port. And I have a lotof legacy VB6 code, so I know the pain involved.
就个人而言,我会认真考虑一个更手动的端口。而且我有很多遗留的 VB6 代码,所以我知道其中的痛苦。
Every time we've faced this, we've simply re-written it in C# - as an approach, it has proven itself many times over.
每次我们遇到这种情况时,我们都会简单地用 C# 重新编写它——作为一种方法,它已经多次证明了自己。
Actually - I recommend Brownfield Application Deveopment(Manning) - it may give some valuable insights on things to have in place before you start.
实际上 - 我推荐Brownfield Application Deveopment(Manning) - 在你开始之前,它可能会提供一些有价值的见解。
回答by RS Conley
The problem is that the conversion tools don't offer support for the VB6 Graphics commands or the VB6 printer model. Plus you get into a lot of corner cases when dealing with ActiveX controls. I know our own CAD/CAM applications won't translate over with any conversion tools as a lot of tweaks are built into the UI to make it work smoothly with the VB6 Form Engine.
问题是转换工具不提供对 VB6 图形命令或 VB6 打印机模型的支持。此外,在处理 ActiveX 控件时,您会遇到很多极端情况。我知道我们自己的 CAD/CAM 应用程序不会通过任何转换工具进行转换,因为在 UI 中进行了大量调整以使其与 VB6 表单引擎一起顺利工作。
These are things that conversion tools fail on as the WinForm Engine requires it's own tweaks. The same thing was experienced when our software moved from DOS to VB3. Sometimes there is no substitution for manual conversion.
这些是转换工具失败的事情,因为 WinForm 引擎需要它自己的调整。当我们的软件从 DOS 迁移到 VB3 时,也经历了同样的事情。有时无法替代手动转换。
With that being said, there are somethings you can do to make conversion considerably easy. First make sure your application is built in layers. This way you can convert one layer at a time, test and continue on. It also has the advantage of leaving you with usable software at every step. I recommend starting at the top (form) layer and working your way down.
话虽如此,您可以采取一些措施使转换变得相当容易。首先确保您的应用程序是分层构建的。通过这种方式,您可以一次转换一层,测试并继续。它还具有在每一步都为您提供可用软件的优势。我建议从顶层(表单)层开始,然后向下工作。
Make sure anything that is VB6 centric and not Basic Centric is behind an interface. When .NET first came out several years ago I created a Canvas Interface and implemented that using the VB6 graphics command. I use the same Canvas interface in VB.NET except now it uses the Graphics Object. The same was done for printers.
确保任何以 VB6 为中心而不是以 Basic Centric 为中心的东西都在界面后面。几年前 .NET 首次出现时,我创建了一个 Canvas 接口并使用 VB6 图形命令实现了它。我在 VB.NET 中使用相同的 Canvas 接口,除了现在它使用图形对象。打印机也是如此。
Nearly all the code was moved out of our forms into classes that the forms called. The forms themselves implement an interface that the UI Classes used. When we switched to .NET we have a precise definition of how the form interacted with the rest of the system and form conversion was considerably easier.
几乎所有的代码都从我们的表单中移到表单调用的类中。表单本身实现了 UI 类使用的接口。当我们切换到 .NET 时,我们对表单如何与系统的其余部分进行交互有了一个精确的定义,并且表单转换要容易得多。
All of these steps where done in VB6 and put through our normal release Q&A process. Then afterward we started the conversion.
所有这些步骤都在 VB6 中完成,并通过我们正常的发布问答流程。然后我们开始转换。
回答by RS Conley
I was quoted $2500 for the professional edition of vb migration partner last year. I didn't buy it so I can comment on it
去年我的 vb 迁移合作伙伴专业版报价为 2500 美元。我没买所以我可以评论
回答by RS Conley
I am Eugenio La Mesa, general manager at Code Architects. I read a few comments on our VB Migration Partner and conversion tools in general, and thought I might add some hopefully useful hints.
我是 Eugenio La Mesa,Code Architects 的总经理。我阅读了一些关于我们的 VB 迁移合作伙伴和一般转换工具的评论,并认为我可能会添加一些希望有用的提示。
First, our conversion software does support all VB6 graphic properties and methods – with the only exception of DrawMode and ClipControls. We even support the AutoRedraw property and user-defined ScaleMode coordinates, therefore the migration of a CAD-like program to VB.NET is quite in the reach of our software. The Code Sample section at www.vbmigration.com contains many examples of graphic-intensive VB6 apps that have been converted to .NET with minimal effort.
首先,我们的转换软件支持所有 VB6 图形属性和方法——唯一的例外是 DrawMode 和 ClipControls。我们甚至支持 AutoRedraw 属性和用户定义的 ScaleMode 坐标,因此我们的软件完全可以将类似 CAD 的程序迁移到 VB.NET。www.vbmigration.com 上的代码示例部分包含许多图形密集型 VB6 应用程序的示例,这些应用程序已通过最少的努力转换为 .NET。
Second, let me clarify our price structure. We sell two different editions of VB Migration Partner: the Professional Edition can convert VB6 apps with max. 50,000 lines of code, whereas the Enterprise Edition has no size limitation and supports a few additional advanced features, such as integration with source code control software and generation of .NET components that are binary-compatible with the original VB6 DLL, which allows you to implement staged migrations of N-tiered COM-based applications.
其次,让我澄清一下我们的价格结构。我们出售两个不同版本的 VB Migration Partner:专业版可以最大转换 VB6 应用程序。50,000 行代码,而企业版没有大小限制并支持一些额外的高级功能,例如与源代码控制软件集成和生成与原始 VB6 DLL 二进制兼容的 .NET 组件,这使您可以实现基于 COM 的 N 层应用程序的分阶段迁移。
The price of the Professional Edition for £399 is a special promotion up to June 30th 2009, during a Microsoft UK marketing campaign, for UK only and for applications up to 50K lines of code (LOCs). The price of the Enterprise Edition may vary because it depends on several factors, including number of licenses and number of LOCs to be migrated. This explains why you may see different price quotations. Also, we have recently slightly decreased the list price as our answer to the economic situation. We are also planning to take a few features out of the main product and offer them separately, which would result in a more flexible price structure.
专业版 £399 的价格是截至 2009 年 6 月 30 日的特别促销活动,在 Microsoft UK 营销活动期间,仅限英国和最多 50K 行代码 (LOC) 的应用程序。企业版的价格可能会有所不同,因为它取决于多种因素,包括要迁移的许可证数量和 LOC 数量。这解释了为什么您可能会看到不同的报价。此外,作为对经济形势的回应,我们最近略微降低了定价。我们还计划从主要产品中去除一些功能并单独提供它们,这将导致更灵活的价格结构。
Quite honestly, for applications with 25-50K LOCs we usually recommend a manual rewrite. In fact, our focus is on the enterprise market segment, where you often finds VB6 apps with several hundred thousand LOCs, if not millions. In those cases, a manual rewrite is seldom a viable option: it requires too many skilled VB6/.NET developers, it takes too long, or just costs too much. We have recently published a case study related to an application with 650K LOCs; one of our customers is currently migrating a monster app with about 15 million LOCs!
老实说,对于具有 25-50K LOC 的应用程序,我们通常建议手动重写。事实上,我们的重点是企业细分市场,在那里您经常会发现 VB6 应用程序具有数十万甚至数百万个 LOC。在这些情况下,手动重写很少是可行的选择:它需要太多熟练的 VB6/.NET 开发人员,需要太长时间,或者成本太高。我们最近发布了一个与具有 650K LOC 的应用程序相关的案例研究;我们的一个客户目前正在迁移一个包含大约 1500 万个 LOC 的怪物应用程序!