spring-projects/spring-net

Assembly name cannot be named 'Common' (CodeConfigApplicationContext, ScanAllAssemblies)

ah1508 opened this issue · 1 comments

Hi,

Component scanning does not work if the application (class library, console application, etc...) assembly name is 'Common'. Easy to test :

namespace ConsoleApplication1 {
    [Component]
    class A {

    }
    class Program
    {
        static void Main(string[] args)
        {
            var ctx = new CodeConfigApplicationContext();
            ctx.ScanAllAssemblies();
            ctx.Refresh();
            Console.WriteLine(ctx.GetObject<A>());
            Console.Read();
        }
    }
}

Acording to the log the assembly is correctly scan but the object is not registered so GetObject fails.

If Common is a forbidden word it should be documented.

lahma commented

I'm doing a rude experiment with closing this, like what stale bot does, but maybe more human as I will probably actually react to feedback. As this issue has been stale for so long, I'll close it. If it's still an issue you would like to pursue, we can definitely reopen.

With limited resources this is just something that we need to do. Thank you for your understanding.