Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ....

i had download of hs tracing program when i debug it an error appears :

" a project with an Output Class Library an not be started directly , to debug this project add an executable project to this solution which references the library project . set the executable project as startup project"

so how can i run this project directly without using executable project . i want to run it just as any other c# form .... can i do this ??? if yes please help me to do that

i am using visual studio 2010 on my machine


with my respect ...
Posted
Comments
BillWoodruff 9-Oct-11 17:30pm    
Is the "hs tracing program" an application ... or is it something meant to provide whatever for an application ?

... What exactly is the "hs tracing program" ?
Badour alsamaraie 10-Oct-11 2:24am    
it is an application and i was downloaded it form this site " i mean codeproject site"
Badour alsamaraie 10-Oct-11 4:29am    
how can i convert it from library to a program ?? i mean use it as any other c# program , what changes can i do to it ??

This error is generated by attempting to run a Class Library project. You can't do that. There is no entry point for this type of project. You can use an executable type of project, such as a console app, then add a reference to the other project. Then use whatever class(s) and methods are in the assembly.
 
Share this answer
 
v2
Comments
Badour alsamaraie 10-Oct-11 4:34am    
how can i convert it from library to a program ?? i mean use it as any other c# program , what changes can i do to it ??
[no name] 10-Oct-11 8:03am    
You can't convert it. A library is not meant to "run", it is meant to be used by other applications or libraries.
Badour alsamaraie 10-Oct-11 11:22am    
ok .... if i want to sue the same code in that library and make the same form of it ... what things that i must remove to do that so it wil be run as a normal program
Hi,
is that library contained any forms.if so then add this method in your application in class
C#
[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }



if that library doesnt have any forms then add a form and call it.
One more thing you need change prorperties of the project
just right click on the project and in the properties change OutPut type to "Windows Application" From "Class Library"


All the best......
 
Share this answer
 
Comments
Badour alsamaraie 13-Oct-11 8:54am    
thanks srikanthgaddala ....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900