I am new in C# & i am using 3-tier architecture in my web application. But i am facing a problem in adding that project in my application. When i add the reference of that project into my application & add the namespace on particular page the page doesn't
show the classes except the default one. So please help me regarding this.
The Step i have taken:
1. add a class library project & define classes into it. After that build that project.
2. Select Add reference from solution explorer & add the dll of that project from bin folder.
But the problem is i cann't able to add the whole project.
Why you cant add the project? Does all projects comes under a solution? if so, instead of adding DLL, please add the project as the reference, Visual studio automatically copy dll files into the reference/bin folder.
what kind of access modifier you are using in the class library classes?
Er. Gursewak...
Member
65 Points
47 Posts
how we add more than one class in class library project?
Apr 24, 2012 05:50 AM|LINK
Hi everyone,
I am new in C# & i am using 3-tier architecture in my web application. But i am facing a problem in adding that project in my application. When i add the reference of that project into my application & add the namespace on particular page the page doesn't show the classes except the default one. So please help me regarding this.
The Step i have taken:
1. add a class library project & define classes into it. After that build that project.
2. Select Add reference from solution explorer & add the dll of that project from bin folder.
3. Add namespace into my page.
Please help guys & Thanx in advance.
Regards,
Gursewak Singh
Er. Gursewak Singh
S/w Engineer
Mastan Oli
Contributor
5100 Points
999 Posts
Re: how we add more than one class in class library project?
Apr 24, 2012 07:26 AM|LINK
First, welcome to C# world, most lovely language :)
Above your steps has to work, but try modify like
1. add a class library project & define classes into it. After that build that project.
2. Select Add reference from solution explorer & add the dll of that project from bin folder.
2. Select Add reference from the solution explorer & add the project (class library project)
3. Add namespace into my page.
playingOOPS | மெய்ப்பொருள் காண்பதறிவு
Mark as Answer If you find helpful
Er. Gursewak...
Member
65 Points
47 Posts
Re: how we add more than one class in class library project?
Apr 24, 2012 07:56 AM|LINK
thanx for your rply.
But the problem is i cann't able to add the whole project.
Er. Gursewak Singh
S/w Engineer
pierrefrc
Participant
947 Points
201 Posts
Re: how we add more than one class in class library project?
Apr 24, 2012 11:07 AM|LINK
Hi
Your class is public?
Mastan Oli
Contributor
5100 Points
999 Posts
Re: how we add more than one class in class library project?
Apr 24, 2012 01:11 PM|LINK
Why you cant add the project? Does all projects comes under a solution? if so, instead of adding DLL, please add the project as the reference, Visual studio automatically copy dll files into the reference/bin folder.
what kind of access modifier you are using in the class library classes?
playingOOPS | மெய்ப்பொருள் காண்பதறிவு
Mark as Answer If you find helpful
Er. Gursewak...
Member
65 Points
47 Posts
Re: how we add more than one class in class library project?
Apr 25, 2012 05:54 AM|LINK
Thanx for your answer.
I forgot to write public before class declartion.
Er. Gursewak Singh
S/w Engineer