473,509 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use classes in another project ?

Hi,

I have added another project to my solution and would like to create
objects of the classes defined in the second project. How can this be
done ?? How can I reference the namespaces etc ??

Thanks,
Akhil

Jun 6 '06 #1
3 1026
lo**********@gmail.com wrote:
Hi,

I have added another project to my solution and would like to create
objects of the classes defined in the second project. How can this be
done ?? How can I reference the namespaces etc ??


Right click on references in the project view and choose add reference,
select the tab that says Projects and choose the project you just added
to the solution.

Andrew Faust
Jun 6 '06 #2
Hi Andrew,

Thank you for your reply but when I used your idea, selected the
project to be added I got an error saying that A reference to the
project cannot be added as An assembly must have a dll extension in
order to be referenced.

Is there any other way ??

Andrew Faust wrote:
lo**********@gmail.com wrote:
Hi,

I have added another project to my solution and would like to create
objects of the classes defined in the second project. How can this be
done ?? How can I reference the namespaces etc ??


Right click on references in the project view and choose add reference,
select the tab that says Projects and choose the project you just added
to the solution.

Andrew Faust


Jun 7 '06 #3
lo**********@gmail.com wrote:
Hi Andrew,

Thank you for your reply but when I used your idea, selected the
project to be added I got an error saying that A reference to the
project cannot be added as An assembly must have a dll extension in
order to be referenced.

Is there any other way ??


I assumed your other project was a DLL project, as that's the standard
way to share classes amongst different apps.

You could change the other application type to a dll in the project
properties. However, the preferred method is to take the classes that
need to be shared and put them in their own dll project, then have both
your other applications reference that dll.

Andrew Faust
Jun 7 '06 #4

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

Similar topics

17
8259
by: Phil Powell | last post by:
Where can I find an online PHP form validator script library to use? I have tried hacking the one here at work for weeks now and it's getting more and more impossible to customize, especially now...
9
6626
by: Aguilar, James | last post by:
I know that one can define an essentially unlimited number of classes in a file. And one can declare just as many in a header file. However, the question I have is, should I? Suppose that, to...
1
1307
by: Geoff Jones | last post by:
Hi I'm starting to look at C# after programming in C++ and was wondering if anybody could help me with the following questions: (1) What is the difference between a Project and Solution In...
1
3956
by: Abdalla Fawaz El-Hawary | last post by:
I have a solution includes 2 projects the 1st one is a class library project and the 2nd is windows application. Normally i can use the classes wich in the 1st project(DLL) after add refrence for...
1
1589
by: Carlos Villaseñor M. | last post by:
Hi every body I still new in C#, now I developing an application (console application) but I've downloaded a project which I need some classes, how can I to include thses classes y my project? ...
3
1010
by: Bart | last post by:
I made a web-application, and i created several classes. Now i want to make a second web-application, which uses the same classes. How can i acchieve this ? Off course with copy - paste, but that...
1
1115
by: Raed Sawalha | last post by:
I have a web application with 100 pages and 30 user controls so we decided to separate some pages and controls into sub projects ( the generated subprojects was 2) the problem we have that now the...
13
1706
by: Simon Dean | last post by:
Hi, I have a couple of questions. If you don't mind. Sorry, I do get a bit wordy at times. First one just throws some thoughts around hoping for answers :-) 1) Anyone got a theory on the...
1
1625
by: ThunderMusic | last post by:
Hi, I have many classes a user may need to call methods on my webservice. Some classes are "published" and some are not... I mean, when we do a Web reference from another project, we don't have...
3
2170
by: Glenn | last post by:
My current classic-ASP site has users, projects, roles and the 2.0 membership looks like a perfect fit, but I'm having trouble finding examples of how to have users that belong to different...
0
7410
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...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
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
5650
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,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.