Consider this setup in .net framework projects/assemblies:
- layer3 (.net framework console app) references Layer2
- Layer2 (.net framework library) references Layer1
- Layer1 (.net framework library) references nothing
Now when I try to access Layer1 from Layer3, it won't allow me:
The type or namespace name 'Layer1' could not be found (are you missing a using directive or an assembly reference?)
This makes sense.
Now when I create the same setup in .net standard projects and a .net core console app, like so:
- layer3 (.net core console app) references Layer2
- Layer2 (.net standard library) references Layer1
- Layer1 (.net standard library) references nothing
I am able to to this, and compile just fine:
Which makes no sense to me.
Is this by design? How do I prevent this behaviour?