Problems executing (running) Application in Managed COBOL

Hi,

I created a new project under the following platform: Windows Forms Control Library(.NET Framework). It comes with a template code. I want to run the application before I add any new code but I encounter the following error: "A .NET project with Output Type Class Library cannot be started correctly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project "

I do not know how to make the changes that the error messages suggest that I make to the project. I am including screenshots with this discussion. 


  • 0  

    Alex,

    The project template simply creates a user control that can be used in an application so in order to debug it you will need to do the following

    Add a Windows Forms Application (.NET Framework) project to your solution

    Make that project the startup project (this will be the executable project referred to in the error) - right-click the project in Solution Explorer and select Set as Startup Project

    Add a project reference to your user control project from your Windows Forms project - right-click the project and Add... -> Reference... Projects and select the user control project

    Your user control should then be listed in the Toolbox window for the Windows Form so you can select it and add it to the form.

    You should then be able to debug it.

    Hope that helps,

    Gael

  • Verified Answer

    +1   in reply to   

    Gael explains how to use the user control project template that you selected but is that really the correct template for what you wish to do? If you are just trying to create a GUI Windows Forms application that runs as an executable, then the template you should select would be the Windows Forms Application (.NET Framework)  template instead.

    Chris Glazier
    Rocket Software - Principal Technical Support Specialist
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to   

    Chris,

    I selected the Windows Forms Application (.NET Framework)  template and it worked, thank you.