Results 1 to 4 of 4

Thread: [2.0] Help withC#

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    Maryland
    Posts
    182

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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: [2.0] Help withC#

    You can also use NUnit to run unit testing on class libraries.

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width