views:

102

answers:

2

I'm getting the following validation error on my layer diagram

Error 65 AV0001 : Invalid Dependency : Weld.Interface.Core(Assembly) --> Weld.Interface(Namespace)

Layers: Application Framework Core, Application Framework | Dependencies: Namespace Reference D:\Projects\Windows Projects\Weld\Weld\ModelingProject1\Weld.layerdiagram 0 0 ModelingProject1

These 2 assemblies are set up as different layers and the assembly name represents the namespace strating point as well

Weld.Interface.Core: This assembly and namespace does not have a reference to Weld.Interface and only references .NET Framework classes

Weld.Interface: This assembly and namespace does not have a reference to Weld.Interface.Core

There is no dependancy between these two layers in the dependency diagram. I am confused why I am getting this error. No dependency in the project or code, and no dependency is even setup in the layer diagram.

Somehow the Validation logic in the layer diagram is seeing a non existant dependency and saying it is an error.

Any ideas what either I might have missed or what is causing this problem?

A: 

OK, I figured out what was going on with my situation and thought I'd pass it along here. It appears to be an issue of cached references to assemblies. When the modeling project was originally created, it was in its own solution, separate from the assemblies it's intending to model. As such, it required listing them within the Layer References for the Modeling project.

The project has since been incorporated into the overall solution, but I believe the project references originally declared when separate from the solution kept precedence and, ultimately, was referencing old code. I removed the assemblies from the Layer References of the Modeling project and everything was smooth sailing after that.

kdawg
A: 

I am having the same problem and unfortunately, this is the only post i found. In my case, Modeling Project was part of a "master" solution from the beginning and if i remove referenced projects from Layer References - it goes "smooth" indeed, but validates nothing! So, this is not a solution.

Errors like "References Generic Parameter, References Generic" must be some kind of bug and the only workaround I could think about it to suppress these specific errors.

I use architecture validation with TFS Build + Gated check-in, to make sure our whole team doesn't brak the architecture.

Dima Gershman