Is there a way to reject project reference.

Is there a way through attributes to tag an assembly so that Visual Studio will generate errors if a different assembly containing an implementation of a certain interface tries to add a reference?

I want to enforce decoupled code and on certain conditions disallow reference to the project that contains service implementations as they should only go through interfaces that exist in an infrastructure assembly.

submitted by /u/skuchoochum
[link] [comments]

Leave a Reply