Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have two class libraries say lib1 and lib2. in lib1 i have a class user.cs inside a folder School. i have a class read.cs inside lib2. when i add reference of school in read.cs like
using lib1.school, it shows not existing error. how can solve that?
Posted
Comments
[no name] 14-May-14 0:15am    
where is your code

There are several minor but important things you need to keep in mind to get this work for you :-

1) The dll is being generated before adding reference to lib1, build the lib1 project first then add the reference to it.
2) Add dependency in lib2 to lib1 so that it will make sure that the lib1 is being biuld before using its reference.
You can add dependency in the solution right click >> Project dependencies.
3) Make sure the class you are trying to access is a public one.
4) Make sure the namespace is being included in the head of read class for Lib1 to access school class.
like :- using TT.Lib1;


Hope these all points will definitely be helpful for you to get the issue fixed.
 
Share this answer
 
you need to add reference to Lib1. if both Lib1 and Lib2 in same solution, in solution explorer, right click on Lib2 and click add reference.
Go to projects tab and select Lib1 and click Ok button. Compile the project and check

if Lib1 and Lib2 not in same solution when you add reference you need to go browse tab and find the Lib1.dll file and click OK.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900