473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

start assembly from "class library" project

hi group,

i am facing the following problem:

i have a vs.net (c#) project, which compiles into a class library. now i
wrote a kind of testcase (with a main method()) which i want to execute
(and debug) from vs.net. but i found no possibility how to execute this
testcase in my project...

any help would be appreciated,
thanks in advance,

marco
Nov 17 '05 #1
5 1668
Hello,

Your testcase project shoud be of type that emits an .exe (console app or
windows app) not a .dll.

"Marco Zapletal" <ma***@telis.winf1.at> wrote in message
news:42***********************@usenet.univie.ac.at ...
hi group,

i am facing the following problem:

i have a vs.net (c#) project, which compiles into a class library. now i
wrote a kind of testcase (with a main method()) which i want to execute
(and debug) from vs.net. but i found no possibility how to execute this
testcase in my project...

any help would be appreciated,
thanks in advance,

marco
Nov 17 '05 #2
Hi Marco,
if your class library has the name MyLibrary.dll you need to make a
reference to that DLL from your testing project (right click reference folder
in solution explorer and add it)

Then inside your main class you can create a type that lives in your dll
and debug it. You will need to make sure that you build MyLibrary.dll in
debug mode so that you can step into the code from your main project.

Hope that helps
Mark.

"Marco Zapletal" wrote:
hi group,

i am facing the following problem:

i have a vs.net (c#) project, which compiles into a class library. now i
wrote a kind of testcase (with a main method()) which i want to execute
(and debug) from vs.net. but i found no possibility how to execute this
testcase in my project...

any help would be appreciated,
thanks in advance,

marco

Nov 17 '05 #3
Siva M wrote:
Hello,

Your testcase project shoud be of type that emits an .exe (console app or
windows app) not a .dll.


first, thanks for your answer. but this means i have to create a second
project (the testcase project that emits an exe), which calls my first
project, or?

regards,

marco
Nov 17 '05 #4
Create the testcase project as win app or console app type, then add a
reference to the class library to be tested and start using the classed
defined in the library.

"Marco Zapletal" <ma***@telis.winf1.at> wrote in message
news:42***********************@usenet.univie.ac.at ...
Siva M wrote:
Hello,

Your testcase project shoud be of type that emits an .exe (console app or
windows app) not a .dll.


first, thanks for your answer. but this means i have to create a second
project (the testcase project that emits an exe), which calls my first
project, or?

regards,

marco
Nov 17 '05 #5
Marco Zapletal wrote:
Siva M wrote:
Hello,

Your testcase project shoud be of type that emits an .exe (console
app or windows app) not a .dll.


first, thanks for your answer. but this means i have to create a
second project (the testcase project that emits an exe), which calls
my first project, or?


There is another alternative, which is to use a unit test tool like NUnit.
It's crafted to make testing of "class library" projects rather
straightforward.

http://www.nunit.org/

--
Reginald Blue
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone."
- Bjarne Stroustrup (originator of C++) [quoted at the 2003
International Conference on Intelligent User Interfaces]
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Engin H. | last post by:
Hi everyone, I developed a Windows Control Library Project and build an assembly named graph.dll. I add this project into an ASP.NET Web Project using "Add existing project" and then add a new...
3
by: Steve Richter | last post by:
here is an error I get when I open my class library project: "The class ResultsTable can be designed, but is not the first class in the file. Visual Studio requires that designers use the first...
1
by: Peter Afonin | last post by:
Hello: I'm just starting to use C# for my ASP.Net applications. Before I used a pretty complicated class written in VB.Net for my applications (I just added this class project to several of my...
1
by: Ron | last post by:
Hello, I need to create/instantiate a global class library project so that 2 EXE's can write to the same class library form in the same instance of the class libary. I am thinking something...
10
by: ajtaylor | last post by:
Hello, I have a load of native C++ code that I want to use in a CLR class library. My "logic" being that I create a C++/CLI managed class that acts as an interface to the unmanged code. I...
3
by: Phaitour | last post by:
Hi there, I'm working on developing a large Class Library project that is slowly becoming a shared "framework" library amongst multiple applications. As this shared library grows, I need to...
4
by: Rainer Queck | last post by:
Hello NG, I started to build me a little class library. This library I added to a Project which also surves me to test the library. This library holds a namespace: namespace <myLib>.<some...
0
by: Jaime Lucci | last post by:
Hi everyone! I have a problem that I can't resolve. In VB2005 I've programmed a new class, where I use a Windows Form with four controls: a SplitContainer, a Panel, a Label and a...
1
by: Martin Plechsmid | last post by:
Hello, (After investigating my real problem) I've got a C# web service containing a single method: public MyBDO Test() { return null; }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.