问题描述
有人用Visual Studio 2010将VB6项目迁移到.Net吗?
Has anyone migrated a VB6 project to .Net with Visual Studio 2010?
我已经在VS2005中测试了迁移,但是生成的.Net代码太混乱了,以至于我们决定不迁移到.Net.相对于VS2005或VS2008中的向导,VS2010迁移向导是否得到了改进?
I have tested the migration in VS2005, but the resulting .Net code was so messed up, that we decided not to migrate to .Net. So has the VS2010 migration wizard been improved over the wizard in VS2005 or VS2008?
推荐答案
在2008年肯定没有,如果在2010年有所不同,我会感到非常惊讶.
It certainly hasn't in 2008 and I'd be very surprised if it's any different in 2010.
VB6和VB.net是完全不同的语言,MS从未正式认可自动迁移路线,无法针对简单应用程序以外的任何事物进行迁移.迁移路径是不平凡的.周围有几家提供迁移服务的公司,虽然我还没有尝试过,但是我的建议是自己管理.
VB6 and VB.net are totally different languages, and MS has never officially endorsed an automatic migration route for anything beyond simple applications. The migration path is non-trivial. There are several companies around that offer migration services, I haven't tried them but my advice would be manage it yourself.
我们目前有几个主要用VB6编写的应用程序.我们的立场是,现有的工作代码不会在没有充分理由的情况下迁移到.net,但是所有新代码都必须使用.net编写(我们实际上已经选择了C#)
We currently have several apps that are written largely in VB6. Our position is that existing working code is not migrated to .net without a good reason, but all new code must be written in .net (We've actually chosen C#)
这意味着,如果我们想向现有的VB6应用程序添加新功能,则该功能必须通过互操作在.net中实现.随着时间的流逝,越来越多的应用程序正越来越成为.net和越来越少的VB.现在,我们有1个应用程序仅包含一个很小的VB6组件,而由于采用了这种逐步移植的方法,其余应用程序几乎完全在.net中.它对我们来说非常有效.一旦我们达到了VB6部分最小的阶段,我们只需手动转换剩余的代码而不会花费高昂的成本,因为只剩下了一点点.
What this means is that if we want to add a new feature to an existing VB6 app the feature must be implemented in .net with some interop. Gradually over time are apps are becoming more and more .net and less and less VB. We have 1 app that just has a tiny VB6 component now and the rest is almost entirely in .net thanks to this gradual migration approach. It has worked very well for us. Once we reach a stage where the VB6 portion is minimal, we simply manually convert the remaining code without high cost because there is only a tiny bit left.
这篇关于VB6使用Visual Studio 2010迁移到.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!