Search code examples
c++visual-studioc++-climanaged

Visual studio 2022 VC++ class wizard new class has a managed option


I am using visual studio 2022 with c++, and I wanted to use the class wizard feature to add a class, when I noticed that in the add class menu there is an unselectable option titled "Managed".

I wanted to ask if anyone knows what it is, is it related to C++/CLI? Does it show up even if I do not have it installed?


Solution

  • If you create a CLR Project you will find that you could select managed.

    enter image description here

    It will create a managed class. I suggest you refer to this issue about ref class.

    enter image description here

    If you want to try to create a CLR Project you need to install C++/CLI Support in the visual studio installer.