THAT'S NOT A DUPLICATE It doesn't work with an alias
How can I reference an assembly with the same Namespace?
This is DLL1:
namespace ClassLibrary1
{
public class Class1
{
public void Test()
{
Console.WriteLine("Test 1");
}
}
}
And this is DLL2 that references DLL1:
namespace ClassLibrary1
{
public class Class1
{
public void Test()
{
new ClassLibrary1.Class1().Test(); //Should call Test() in DLL1
Console.WriteLine("Test 2");
}
}
}
Obviously this will not work as expected. I already tried to set a different alias for the reference (DLL2 -> DLL1). Visual Studio seems to ignore the alias not matter what I do.
It doesn't work with an alias
myAlias::ClassLibrary1.Class1() is NOT WORKING Visual Studio (the compiler) ignores the alias. If I build and start my solution I get an endless loop.