473,670 Members | 2,551 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 1033
lo**********@gm ail.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**********@gm ail.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**********@gm ail.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
8281
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 with form elements that turn out to be arrays that have to be compared with one another! I have one form element, languages, a checkbox group. Beside each checkbox is a dropdown, proficiency (which will become proficiency alongside languages)....
9
6634
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 use the common example, I have a situation where I am implementing many types of Shapes. My current way of thinking is, well, since they are all the same type, let's just put them all in the same file. The include file would be "shapes.h" and it...
1
1318
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 Visual Studio ..NET? (2) When programming in C++, to allow a file/class to know about other classes, I normally include a header file in the source file of the class.
1
3970
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 this project at the windows application(2nd project) but the problem is i can't do the versa (how can i call any classes located in the windows application project from the DLL(1st project)... for example i need to call bank_win.Form1 class which...
1
1596
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? I appreciate some help Regards Carlos Villaseñor M.
3
1017
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 would give problems, when i change something in the classes. The other project wouldn't be up-to-date. Isn't it possible to put al my classes in some 'package', and 'import' the 'package' in some other application ? Bart
1
1123
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 parent and the 2 subprojects will use a classes in parent project (Tools.Utilities folder in parent prj has at least 5 classes) and used in 3 projects, we dont want to duplicate the folder in each project .....what is avaiable technique to share...
13
1724
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 usage of PHP Classes rather than an actual technical guide? I've seen loads of things that show how to put together a class, but without actually necessarily saying why you'd want to use a class over say a separate file of functions or explaining:
1
1638
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 access to some classes remotely... Is there something special these classes need so we can use them remotely? There's an example at the end of the post Here, Result is accessible, but ContactData is not... and there are others
3
2175
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 projects, and have different roles per project. The current model.. * When a user joins my site, they eventually end up joining or creating one or more projects. But, they are not required to be a member of a project to be a member of the site.
0
8466
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8384
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8813
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8591
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6212
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5683
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2799
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 we have to send another system
2
2037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1791
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.