NDepend: Multiple TFS Branches lead to "several assemblies have the name but are different"

StackOverflow https://stackoverflow.com/questions/23414883

  •  13-07-2023
  •  | 
  •  

문제

I'm new to NDepend at work and am trying to get my head wrapped around some of the basics. I tried searching online but couldn't come across the answer for this one.

The Background

We're using TFS 2010 (I know, I know; we're looking to update that whole process.) within TFS, we're using branches. And since TFS doesn't have a concept of a "working directory" (to my knowledge), I usually wind up on my desktop with something along the lines of:

\MyProjects
    \ProjectName-Branch1
        \ProjectName.sln
    \ProjectName-Branch2
        \ProjectName.sln

As these are branches, I expect them to contain different code.

The Problem

The problem arises when I try to analyze an assembly. I do the following:

  • Open one of the branch solutions (e.g. ProjectName-Branch1\ProjectName.sln)
  • I check my solution file out for editing.
  • I head to NDepend --> Attach NDepend Project to Current VS Solution

However, despite attaching it only to that project, I see a number of errors along the lines of:

Several .NET assemblies have the name {ProjectAssemblyName} but they are different.

It then lists DLL files from both branch folders.

My Question

How do I avoid this conflict to help NCover exclude branch folders from each other, and ensure it doesn't occur again?

Thanks!

도움이 되었습니까?

해결책

According to the NDepend support response, which I'm posting here for reference:

NDepend project takes a list of assembly name (without file extension) and a list of directories. It then resolves assemblies in these directory by name, and if several assemblies with the same name are found, you get the error.

What you can do is go to : NDepend > Project Properties > Code to Analyze > Folders and erase the folders of the branch(es) you want to discard.

This did seem to resolve the issue for me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top