How to call one project from another in vs2005
I have 2 projects called SQLDiscovery and TestApp ("TestApp" solution (2 projects)
TestApp solution (2 projects) |
| ---> (SQLDiscovery) Contains the SQLDiscover class and DisplayLocalinstances () method
---> (TestApp) which contains main ()
Now i want to access DisplayLocalInstances () in main.how i can do this. Already for 2nd proj k hav chhose proj 1 as a dependency project.
a source to share
First you need to add a reference to the project you want to call it by method. Then make sure the method is visible outside of it containing the assembly (defined inside a public class and marked as public).
In fact adding aa link is a very trivial task, just select the client project (the project from which you will call another project function), right click and select the link, in the dialog select the Projects tab, select the project which contains the function that you want to use, and Voila! You are all in tune.
a source to share