Blog

Release of the Next-Generation CodePorting.Translator Cs2Cpp

We are announcing the release of a major architectural update to CodePorting.Translator Cs2Cpp. The next-generation translator has been completely rewritten to utilize Roslyn, replacing the legacy NRefactory library used in previous iterations. This transition resolves a significant architectural limitation of the older version, which was restricted to C# 5. By leveraging Roslyn, the new translator natively supports modern language features—currently up to C# 13—and is positioned to support future versions of C# as the language continues to evolve.If you have previously encountered limitations when trying to port modern C# codebases to C++, this release removes those barriers and opens up new possibilities for your projects. Expanded Language Support The transition to Roslyn's semantic analysis has unlocked support for a vast array of powerful language features that were previously unsupported. The new translator handles complex modern patterns seamlessly, including: Asynchronous Workflows & Iterators: Full support for async/await (translated into state machines wrapped in Task templates) and the yield operator. Records & Primary Constructors: Complete translation of reference and struct records, the with keyword, and primary constructors. Advanced Pattern Matching: Support for switch expressions, property and positional patterns, and C# 11 list patterns. Modern Data Structures: Translation of Value Tuples, Span<T>, Memory<T>, and stackalloc. Syntactic Sugar: LINQ query syntax, expression-bodied members, string interpolation, null-propagation (?. and ?[]), and auto-property initialization. Latest Additions: Support for recent language enhancements such as file-scoped namespaces, function pointers, and C# 12 collection expressions. For a detailed technical breakdown of how these modern constructs are mapped to C++, please refer to the New Features documentation. Integration Upgrading your translation pipeline is designed to be straightforward. The next-generation translator acts as a drop-in replacement for your existing workflows. It accepts the same command-line arguments, reads the same configuration files, and respects the same code attributes you are already familiar with. Because the new engine requires the C# projects to be semantically correct, you can now leverage the full power of Roslyn's compiler to ensure your code is translated with high precision. Whether you are integrating this into an existing CI/CD pipeline or trying it out locally, the migration path is smooth and well-documented. For detailed instructions on transitioning your projects and build environments, please refer to the Migration Guide. Documentation and Downloads We have published a comprehensive documentation portal to help you set up the new translator, understand its capabilities, and integrate it into your build scripts. Documentation Portal: CodePorting.Translator Docs Download the latest release: CodePorting.Translator Cs2Cpp Getting Started with Next-Gen: Next-Gen Translator Overview
link

25 October 2026

API Reference Section for CodePorting.Translator Cs2Cpp Framework Now Available

The website now includes a comprehensive API Reference for the CodePorting.Translator Cs2Cpp Framework. This documentation provides detailed descriptions of all namespaces, classes, and their functions to help effectively utilize the C++ library, essential for projects translated from C# to C++. The CodePorting.Translator Cs2Cpp Framework contains C++ implementations of .NET Framework types and methods, enabling seamless integration and functionality for translated C# projects. The new API Reference section is designed to help you understand and utilize the framework more effectively. It includes thorough explanations of each function, along with examples and detailed descriptions. We hope this resource will assist you in your projects and enhance your experience with the CodePorting.Translator Cs2Cpp Framework. For more details, please visit the API Reference section on our website.
link

25 October 2024

New Articles Section Now Available

We are pleased to announce the launch of a new section on our website dedicated to Articles. This section will feature detailed discussions on our experience in converting C# projects into C++, Java, and Python. Our articles will cover various aspects of code translation, including the challenges and solutions we have encountered. We will also provide insights into the development of our translation tools, such as CodePorting.Translator Cs2Cpp, CodePorting.Translator Cs2Java, and our tool for creating C# wrappers for Python environments - CodePorting.Wrapper Cs2Python. In these articles, we will address common issues faced during code conversion and how translated code can function effectively in new programming environments while maintaining its original functionality. We hope you find our articles informative and useful. You can view the new section here: Articles.
link

02 February 2024