问题描述
我只是试图将sln文件加载到Visual NDepend中并不断出现此错误:
I am simply trying to load sln files in to Visual NDepend and keep getting this error:
最奇怪的是,对于在不同路径下的相同程序集。例如:
The weirdest thing is that this error doesn't occur for the same assemblies under a different path. For example:
在路径 C:\code\depot\Product\Stage\下的程序集中不会发生该错误。 \IA\
,并将出现在 C:\code\depot\Product\IA
我在使用Visual NDepend时正在执行的步骤:
The steps I am taking while using Visual NDepend:
- 打开NDepend
- 单击分析VS解决方案和VS项目
- 浏览
- 查找sln的特定实例。
- 单击打开
- 发生错误
- Open NDepend
- Click on Analyze VS solutions and VS projects
- Browse
- Find a particular instance of a sln.
- Click open
- Error occurs
我遵循相同的步骤,但发现相同的步骤解决的方法不同,错误消失了!程序集是相同的!任何帮助将不胜感激。
I follow these same steps but find the same solution in a different path and the errors disappear! The assemblies are identical! Any help would be very much appreciated.
推荐答案
这当然是来自读取.sln文件并尝试推断文件夹的问题
This certainly comes from problem when reading the .sln file and trying to infer the folders in which your assemblies are.
通常,NDepend希望分析.sln DEBUG配置。这是因为,当NDepend能够访问PDB时,它可以进行更深入的分析,解释
Typically NDepend expects to analyze a .sln DEBUG configuration. This is because when NDepend have access to PDB it can analyze more in-depth, explanation here
要解决此问题,您可以转到NDepend项目属性>分析代码>展开目录面板>确保引用的目录是包含以下内容的目录所有的程序集。
To solve this, you can go to NDepend Project Properties > Code to Analyze > unfold the Directories panel > make sure directories referenced are the one that contain all your assemblies.
然后,您可以使用NDepend Project Properties>引用的路径来定义如何引用目录路径(相对/绝对/ envvar ...)
Then you can use NDepend Project Properties > Paths referenced to define how directories paths are referenced (relative/absolute/envvar...)
这篇关于“在指定的文件夹中找不到.NET程序集{AssemblyName}。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!