Visual C++ WinRT FAQ – Does C++/CX produce managed code?

A variation on this question is people asking if C++/CX generated WinRT DLLs/apps require the .NET framework. The answer is No! WinRT is a native COM based framework, and C++/CX produces 100% native binaries. The syntax is similar to C++/CLI (which produces managed code) which may be the cause of confusion. You are not allowed to mix managed code in a C++/CX project – so you cannot use C++/CLI and C++/CX in the same project, and in fact C++/CLI is not supported for WinRT. That said, if your application uses a WinRT component that was written in C#, then your deployed application will have a .NET dependency since the required DLL is managed. But C++/CX itself is a 100% native language/compiler/technology.

2 thoughts on “Visual C++ WinRT FAQ – Does C++/CX produce managed code?”

  1. The winmd files are metadata and they use the same format as that specified in the CLI specification. Any code that’s generated is 100% native.

Leave a Reply