Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Beginning C# 2005 Databases
|
BOOK: Beginning C# 2005 Databases
This is the forum to discuss the Wrox book Beginning C# 2005 Databases by Karli Watson; ISBN: 9780470044063
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 2005 Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2008, 02:06 AM
Authorized User
 
Join Date: Sep 2008
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default DLL file error in running- Basic concept

I have learned how to make DLL file from the link:
http://www.c-sharpcorner.com/UploadF...058AM/dll.aspx
but when i build my file the error comes:
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.

What should i do to remove this error, i m just a novice, plz tell me step by step. Thank u in advance.

How to do programming?
__________________
How to do programming?
The Following User Says Thank You to arbab For This Useful Post:
 
Old September 20th, 2008, 02:19 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Just do exactly what the message tells you.

A DLL is only a LIBRARY. It is designed to be something that is CALLED by other pieces of code.

So the message is telling you that you must create another project--this time one that is NOT a DLL project--and then you can call the routines in your library (your DLL) from that project.

Suppose, for example, that your DLL contains a class named "MyClass" and that class has a method called "MyMethod".

Okay, then you would create an executable program (a ".exe" or equivalent) that would do
    MyClass myObject = new MyClass( );
    myObject.MyMethod( );
or however you designed the class that is in your library.

Again, read the error message. It is telling you everything you need to do:

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.
The Following User Says Thank You to Old Pedant For This Useful Post:
 
Old September 20th, 2008, 02:35 AM
Authorized User
 
Join Date: Sep 2008
Posts: 54
Thanks: 8
Thanked 1 Time in 1 Post
Default

How to do it? how to create exe file plz tell me step by step
 
Old September 20th, 2008, 04:36 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I have a better idea.

Start over learning C#.

You should have created an executable a *LONG* time before you even began thinking about creating a DLL.

Go to http://www.asp.net/Learn or to http://msdn.microsoft.com/Express and work your way through one or more of the "startup" tutorials on programming in C#.

In the long run, this will save you a lot of time and trouble and problems.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on Visual Basic 6 Install File with CR XI R2 jmss66 Crystal Reports 0 August 25th, 2008 10:41 AM
Error in running the .exe file of my application spc C# 0 November 28th, 2005 01:42 AM
Error:Object required, running COM dll with ASP mannanhere Classic ASP Components 1 August 6th, 2005 01:02 AM
Creating resource DLL in visual basic 6.0 Zunaid Pro VB 6 5 March 23rd, 2004 09:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.