I can't understand why I can't find C++/CLI project type in to Visual Studio 2017. I just updated my Visual Studio, and now I can't create any more Windows Forms applications.
C++ runs directly as binary complied for your hardware. C++ cli is a c++ extension that is used to interface with the MS common language runtime. It complies to IL normally and is executed inside the . net runtime.
C++/CLI is variant of the C++ programming language, modified for Common Language Infrastructure.
In the Visual Studio IDE, the /clr compiler option can be individually set on the Configuration Properties > C/C++ > General page of the Property Pages dialog.
Valid for visual studio 2017,2019,2022
The answer is solved in this visual studio community forum.
I copied the solution here for convenience:
Please make sure you have selected the component "C++/CLI support" in your installation;
First, Microsoft implementation of C++/CLI is called CLR so you want to look for CLR project type when creating new project.
Second, it's an optional component in Visual Studio 2017.
From the link:
In Visual Studio 2017 and later, C++/CLI support is an optional component. To install it, open the Visual Studio Installer from the Windows Start menu. Make sure that the Desktop development with C++ tile is checked, and in the Optional components section, also check C++/CLI Support.
The 2nd screen shot you have shared, go to individual components
tab and select C++/CLI option (that's how it appears there).
I haven't not tested this for VS2017 but I did test it for VS2019 and that's what needs to be done. I am pretty sure it's the same for both visual studios.
Here is the screenshot for VS2019.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With