The answer is allowed on this visual studio community forum .
I copied the solution for convenience:
Please make sure that you select the "C ++ / CLI Support" component in your installation;
- Run the "Visual Studio Installer"
- Change your installed VS;
- You can find the "C ++ / CLI Support" component under the "Developing Desktop Using C ++" workload

source share