|
1 | 1 | ---
|
2 | 2 | title: ".NET programming with C++/CLI"
|
3 | 3 | description: "Learn how to use C++/CLI to create .NET apps and components in Visual Studio."
|
4 |
| -ms.date: 10/28/2021 |
| 4 | +ms.date: 05/02/2025 |
5 | 5 | helpviewer_keywords: ["programming [C++], .NET programming", ".NET Framework [C++]", ".NET applications [C++]", "Visual C++, .NET programming"]
|
6 | 6 | ---
|
7 | 7 | # .NET programming with C++/CLI
|
8 | 8 |
|
| 9 | +C++/CLI supplanted Managed C++. C++/CLI is a language specification created by Microsoft that extends C++ to support .NET. It's only supported on Windows. It's not for writing [WinUI](/windows/apps/winui) or Universal Windows Platform [UWP](/windows/uwp/get-started/universal-application-platform-guide) Windows Runtime (WinRT) apps. It's for writing .NET applications and components that run on .NET. C++/CLI is a bridge between native C++ code and managed code. It allows you to use existing C++ libraries in .NET applications and to write new .NET applications in C++. |
| 10 | + |
| 11 | +Microsoft provides C++/WinRT for writing WinUI and WinRT apps. It's an entirely standard modern C++17 language projection for Windows Runtime (WinRT) APIs. For more information about using C++ with the Windows Runtime (WinRT), see [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/). |
| 12 | + |
9 | 13 | ::: moniker range="msvc-140"
|
10 | 14 |
|
11 | 15 | By default, CLR projects created with Visual Studio 2015 target .NET Framework 4.5.2. You can target .NET Framework 4.6 when you create a new project. In the **New Project** dialog, change the target framework in the dropdown at the top middle of the dialog. To change the target framework for an existing project, close the project, edit the project file (*`.vcxproj`*), and change the value of the Target Framework Version to 4.6. The changes take effect the next time you open the project.
|
@@ -41,40 +45,23 @@ C++/CLI itself isn't installed by default when you install a Visual Studio C++ w
|
41 | 45 |
|
42 | 46 | ## In this section
|
43 | 47 |
|
44 |
| -[C++/CLI tasks](../dotnet/cpp-cli-tasks.md) |
45 |
| - |
46 |
| -[Native and .NET interoperability](../dotnet/native-and-dotnet-interoperability.md) |
47 |
| - |
48 |
| -[Pure and verifiable code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md) |
49 |
| - |
50 |
| -[Regular expressions (C++/CLI)](../dotnet/regular-expressions-cpp-cli.md) |
51 |
| - |
52 |
| -[File handling and I/O (C++/CLI)](../dotnet/file-handling-and-i-o-cpp-cli.md) |
53 |
| - |
54 |
| -[Graphics operations (C++/CLI)](../dotnet/graphics-operations-cpp-cli.md) |
55 |
| - |
56 |
| -[Windows operations (C++/CLI)](../dotnet/windows-operations-cpp-cli.md) |
57 |
| - |
58 |
| -[Data access using ADO.NET (C++/CLI)](../dotnet/data-access-using-adonet-cpp-cli.md) |
59 |
| - |
60 |
| -[Interoperability with other .NET languages (C++/CLI)](../dotnet/interoperability-with-other-dotnet-languages-cpp-cli.md) |
61 |
| - |
62 |
| -[Serialization (C++/CLI)](../dotnet/serialization-cpp-cli.md) |
63 |
| - |
64 |
| -[Managed types (C++/CLI)](../dotnet/managed-types-cpp-cli.md) |
65 |
| - |
66 |
| -[Reflection (C++/CLI)](../dotnet/reflection-cpp-cli.md) |
67 |
| - |
68 |
| -[Strong Name assemblies (assembly signing) (C++/CLI)](../dotnet/strong-name-assemblies-assembly-signing-cpp-cli.md) |
69 |
| - |
70 |
| -[Debug class (C++/CLI)](../dotnet/debug-class-cpp-cli.md) |
71 |
| - |
72 |
| -[STL/CLR library reference](../dotnet/stl-clr-library-reference.md) |
73 |
| - |
74 |
| -[C++ support library](../dotnet/cpp-support-library.md) |
75 |
| - |
76 |
| -[Exceptions in C++/CLI](../dotnet/exceptions-in-cpp-cli.md) |
77 |
| - |
| 48 | +[C++/CLI tasks](../dotnet/cpp-cli-tasks.md)\ |
| 49 | +[Native and .NET interoperability](../dotnet/native-and-dotnet-interoperability.md)\ |
| 50 | +[Pure and verifiable code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md)\ |
| 51 | +[Regular expressions (C++/CLI)](../dotnet/regular-expressions-cpp-cli.md)\ |
| 52 | +[File handling and I/O (C++/CLI)](../dotnet/file-handling-and-i-o-cpp-cli.md)\ |
| 53 | +[Graphics operations (C++/CLI)](../dotnet/graphics-operations-cpp-cli.md)\ |
| 54 | +[Windows operations (C++/CLI)](../dotnet/windows-operations-cpp-cli.md)\ |
| 55 | +[Data access using ADO.NET (C++/CLI)](../dotnet/data-access-using-adonet-cpp-cli.md)\ |
| 56 | +[Interoperability with other .NET languages (C++/CLI)](../dotnet/interoperability-with-other-dotnet-languages-cpp-cli.md)\ |
| 57 | +[Serialization (C++/CLI)](../dotnet/serialization-cpp-cli.md)\ |
| 58 | +[Managed types (C++/CLI)](../dotnet/managed-types-cpp-cli.md)\ |
| 59 | +[Reflection (C++/CLI)](../dotnet/reflection-cpp-cli.md)\ |
| 60 | +[Strong Name assemblies (assembly signing) (C++/CLI)](../dotnet/strong-name-assemblies-assembly-signing-cpp-cli.md)\ |
| 61 | +[Debug class (C++/CLI)](../dotnet/debug-class-cpp-cli.md)\ |
| 62 | +[STL/CLR library reference](../dotnet/stl-clr-library-reference.md)\ |
| 63 | +[C++ support library](../dotnet/cpp-support-library.md)\ |
| 64 | +[Exceptions in C++/CLI](../dotnet/exceptions-in-cpp-cli.md)\ |
78 | 65 | [Boxing (C++/CLI)](../dotnet/boxing-cpp-cli.md)
|
79 | 66 |
|
80 | 67 | ## See also
|
|
0 commit comments