views:

52

answers:

1

I have a solution called StoreExample
It has one web project - StoreExample.Web
It has one class library StoreExample.Core

Web has a reference to Core. What is the proper way to get an assembly reference to StoreExample.Core so I can loop over the classes in StoreExample? It seems like in LoadAssembly() method call I have to know the path to the assembly. Should I have to? If so what is the standard line of code for this? If not, what is the correct way to do it?

+2  A: 

You should be able to use System.Reflection.Assembly.GetAssembly() as shown below:

Assembly.GetAssembly(typeof(StoreExample.Core.SomeClassInCore));
Jose Basilio