CLR components cannot be added to a project using old Syntax c++  
Author Message
Duzinga





PostPosted: Common Language Runtime, CLR components cannot be added to a project using old Syntax c++ Top

Hi,

I am working on migrating a Visual C++ project into .NET environment. The project in its current state compiles and runs just fine with CLR support, and I can use clr components such as windows forms provided that I write the code myself, but Visual Studio does not let me add a Windows Form, using the Add New Item into the project, and it gives me the error "CLR components cannot be added to a project using old Syntax c++. Please convert the project to use the new syntax." Does anyone know what the problem might be

Thank you.



.NET Development16  
 
 
nobugz





PostPosted: Common Language Runtime, CLR components cannot be added to a project using old Syntax c++ Top

The VS2005 Windows Forms designer can only generate code in the C++/CLI syntax and no longer supports the Managed C++ syntax. You'll either need to convert your code to the C++/CLI syntax or go back to VS2003 or put your forms in an assembly by themselves, separately compiled from your Managed C++ code.


 
 
Duzinga





PostPosted: Common Language Runtime, CLR components cannot be added to a project using old Syntax c++ Top

Thank you for the reply.

If I add the Forms by code would it be possible to diplay/change them using the Windows Forms designer in VS2005