A project with an output type of class library cannot be started directly

December 12, 2010 at 10:00 pm 5 comments


Did you get bellow error message while compiling your ASP.NET project  or your C# project in Visual Studio 2005 or Visual Studio 2008 ?

Error message:

A project with an Output type of Class Library cannot be started directly. 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.

To fix this issue, do these steps:

  • Right click the Project name in Solution Explorer of Visual Studio
  • Select Set as StartUp Project from the popup menu
  • Re-run your project, it should work !

If it did not work, be sure that you have set your start page. If your project is C# Windows Application or C# Console Application, try this:

  • Right click the Project name in Solution Explorer of Visual Studio
  • Select Properties
  • Select Application tab
  • In Output type drop box, select the correct application type of your project
  • Re-run your project and let me know if it won’t work.
Advertisements

Entry filed under: C# Programming, Web Programming, Windows. Tags: , , , , , , .

How To Set Environment Variables in Windows ? How to disable the menu of JW Player ?

5 Comments Add your own

  • 1. vaishnavi  |  June 30, 2011 at 11:19 pm

    hi ,Its not working for me .I created a library project and referenced it to my project and also set that as start up project .I have created a Windows Class library and coded it in .cs project .I have set the output type to Class Library .But it is throwing the same error repeatedly.

    Reply
  • 2. anu  |  April 29, 2012 at 12:35 am

    Same thing happening here .I created a library project and Compile the project, error throwing :

    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.

    Reply
  • 3. siri  |  May 25, 2012 at 7:03 am

    hi Vaishnavi,

    In oreder to gety rid of this error you need to set Application type as Windows forms applcation not class library.

    Reply
  • 4. Sandibellota  |  June 13, 2012 at 1:48 pm

    I have the same Error, i Have a ASP.Net Application but when i change the Output type doesn’r work, really i don’t know what happen :(, I use VS2008. Thanks

    Reply
  • 5. robxool  |  June 27, 2012 at 8:22 am

    And then… vaishnavi you have to have a static void Main() in any place that calls your frames.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

/openmp AMD app fixing dead pixel iphone C++ cmd program CPU C sharp dead pixels directory download ibm synthetic data generator Dynamic Dynamic Memory Allocation Edit Environment Variables in Windows Environment Variables error lnk2019: unresolved external symbol _getprocessmemoryinfo@12 referenced in function error lnk2019: unresolved external symbol _ getprocessmemoryinfo@12 referenced in function "void __cdecl printmemoryinfo(unsigned long example code Fixing Dead Pixels and Gray Lines on the iPhone Screen Fixing Dead Pixels on the iPhone Screen Fixing Gray Lines on the iPhone Screen Fix iPhone getprocessmemoryinfo GPU Gray Line iPhone Screen gray lines gray pixels green pixels GUI how to "new" a two-dimension array in C++ how to use ibm quest synthetic data generator ibm data generator ibm quest data generator ibm quest data generator exe ibm quest data mining project ibm quest market-basket synthetic data generator ibm quest market basket market-basket synthetic data generator ibm quest synthetic data generator ibm quest synthetic data generator linux ibm synthetic data generator ibm synthetic generator Intel iPhone Iphone 3G iPhone 3GS iPhone 4 iphone gray lines on startup iphone pixel damage iPhone Screen iPhone screen damage Linux market-basket synthetic data generator Memory Allocation Multicore multithread multi thread multi threaded multithreading mysql extract data into file new OpenCL Path processor quest data generator quest synthetic data generator R SAS Set Environment Variables Set Environment Variables in Windows souce code source code stuck pixels system file two dimension array Windows 7 Windows Vista

%d bloggers like this: