Monday 15 April 2013

c# - Is there any way to prevent certain references from being included on a project? -


Actually I want to do some preventive maintenance. There are some third-party libraries that I want to prevent from joining the contexts of a particular project. Can you specify in any way what context are forbidden for a project?

EDIT: I will clarify this purpose a little bit. The project I want to preserve is an orbit library that I want to work with a very specific set of third party libraries. Class Library is used in other solutions for common data access functionality, if those third-party libraries are referenced, they will also be required to have a project to have only one data access library and "package" Keep lightweight.

EDIT2: Due to the votes given below is not fixed. Is there a question about whether this type of thing can happen or not?

You can use it to get it (assuming you have Visual Studio Ultimate) Create a box / layer that represents the project, then leave your project to add it, create a box / layer representing the taboo assemblies, then leave those assemblies to link them, and your (one Dependent Arrow Layers, You VS Are indicating that no dependencies are allowed).

Now turn on the layer diagram verification in the project and / or the setting of the TFS Build by the MSBuild property: ValidateArchitecture = True

No comments:

Post a Comment