Are there any tools for converting Managed C++ to C++/CLI? [closed]

雨燕双飞 提交于 2019-12-01 17:02:39

问题


We have an old project written using Managed C++ syntax. I would like to propose to the team a reasonably pain-free (I don't mind some level of human interaction, I think I'm realistic in my expectations that we'll still have to do some work by hand) method of updating the existing code to C++/CLI syntax so that we can also add XML documentation (the project is a library into other projects and having documentation would be immensely useful).

So, are there any good tools out there to help with this? Or is it just a case of switching to the new C++/CLI syntax compiler and fixing errors as we go?


回答1:


Microsoft has a tool that will help a little. Visual c++ blog post about it. Here are a couple other resources I found useful when I made our switch C++/CLI Migration Primer Managed Extensions for C++ Syntax Upgrade Checklist

The Microsoft tool is just a start. there were many files that it could not convert.




回答2:


Unfortunately, I found the migration tool from Microsoft to be two steps away from useless. However, there is the C++/CLI disassembler for Reflector, which has proved a lot more useful.

This isn't perfect as comments get lost, but I've found that re-adding the comments is much easier than trying to hand-convert the majority of the code.



来源:https://stackoverflow.com/questions/151776/are-there-any-tools-for-converting-managed-c-to-c-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!