项目转换问题 [英] Project Conversion Question

查看:61
本文介绍了项目转换问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Visual C ++ 2010创建的项目,我想知道谁将sln(项目文件)从C ++转换为VB.net?

I have a project that was created using Visual C++ 2010 and I would like to know who to convert the sln (project file) from C++ to VB.net?

推荐答案

如果这是C ++而不是C ++ / CLI,则没有转换,它根本没有意义:语言针对不同的非同构平台。在实践中,通过UI,仅使用原始代码作为创建新代码的参考。在尝试这样做之前,请再次审核您的决定:您真的想要这个翻译吗?特别是做VB.NET?值得吗?你会得到什么?给自己一个合理的怀疑。



如果这是C ++ / CLI并且所有代码都是可管理的,请考虑问题已经解决。构建项目,然后使用输出程序集将其反向工程为VB.NET(或C#)代码。怎么样?一个完美的开源工具是ILSpy:

http://en.wikipedia.org/wiki/ .NET_Reflector [ ^ ],

http://www.ilspy.net/ [ ^ ]。



您可以合理地期望优质的反向工程代码,如果原始代码的质量已经足够了。



第一篇文章中提到的.NET Reflector,其中也引用了ILSpy,可能会更好,但它不是开放的来源,你将不得不为此付出代价。我不会。



如果您的C ++项目是混合模式(托管+非托管),请尝试使用混合方法。 :-)







回复我的原帖是错的。原文Pong Clong项目的代码用Visual C#而不是C ++或C ++ / CLI编写:



VB.NET和C#都是.NET。您可以在用VB.NET编写的项目中自由引用用C#编写的程序集,反之亦然。此外,基于ILSpy的方法将完美运行,并将为您提供优质的代码。



-SA
If this is C++ and not C++/CLI, there is no "conversion", it simply makes no sense: the languages target different no-isomorphic platforms. In practice, through out UI, use the original code only as a reference for creating a new one. Before even trying to do it, review your decision again: do you really want this "translation"? Especially do VB.NET? Does it worth it? What are you going to gain? Give yourself a reasonable doubt.

If this is C++/CLI and all the code is manageable, consider the problem is already solved. Build the project and then use the output assembly to reverse-engineer it to VB.NET (or C#) code. How? One perfect open-sourcer tool is ILSpy:
http://en.wikipedia.org/wiki/.NET_Reflector[^],
http://www.ilspy.net/[^].

You can reasonably expect excellent quality of reverse-engineered code, if the quality of original code was good enough.

The .NET Reflector mentioned in the first article where ILSpy is also referenced, can be even better, but it is not open source and you will have to pay for it. I wouldn't.

If your C++ project is the mixed-mode one (managed+unmanaged), try to use mixed approach. :-)



In response to "My original post is wrong. The original code for the Pong Clong project is written in Visual C# not C++ or C++/CLI":

Both VB.NET and C# target .NET. You can freely reference the assembly written in C# in the project written in VB.NET and visa versa. Besides, the method based on ILSpy will work perfectly and will give you excellent quality of code.

—SA


这篇关于项目转换问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆