-
[2.0] Help withC#
I am new to C#
but when i try to debug a project,
i get this message
A project a with a OutPut type of class library cannot be started directly.
In order to debug this project add a executable to this solutionwhich references the library project.
i get this all the time.
I am totally new to this can anyone tell me how to fix this.
-
Re: [2.0] Help withC#
You cannot run a class library (DLL) on its own. You can only run an application (EXE), which can reference your DLL. If you've created a class library project and you want to debug it you need to create an application that references that library in order to debug it. You then run the application and you will be debugging both. If you already have an application project in your solution then it may be that you've set the wrong project as the startup project. Otherwise you may have created the wrong type of project in the first place.
-
Re: [2.0] Help withC#
You can also use NUnit to run unit testing on class libraries.
-
Re: [2.0] Help withC#
When you make a reference to the class, by calling a method or a constructor for example, you can step in to the class library's code from your project. Under certain conditions of course.