none
CLR components cannot be added to a project using old Syntax c++ RRS feed

  • Question

  • 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.

    Monday, November 27, 2006 2:49 PM

Answers

  • 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.
    Monday, November 27, 2006 4:21 PM
    Moderator

All replies

  • 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.
    Monday, November 27, 2006 4:21 PM
    Moderator
  • 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?

    Wednesday, November 29, 2006 8:31 AM