“在指定的文件夹中找不到.NET程序集{AssemblyName}。” [英] "Can't find the .NET assembly {AssemblyName} in specified folders"

查看:178
本文介绍了“在指定的文件夹中找不到.NET程序集{AssemblyName}。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是试图将sln文件加载到Visual NDepend中并不断出现此错误:

I am simply trying to load sln files in to Visual NDepend and keep getting this error:


找不到.NET指定文件夹中的程序集{AssemblyName}。是否已正确编译? NDepend项目是否缺少.NET程序集的包含文件夹?

Can't find the .NET assembly {AssemblyName} in specified folders. Has it been compiled properly? Is the NDepend project missing the containing folder of the .NET aseembly?

最奇怪的是,对于在不同路径下的相同程序集。例如:

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:


  1. 打开NDepend

  2. 单击分析VS解决方案和VS项目

  3. 浏览

  4. 查找sln的特定实例。

  5. 单击打开

  6. 发生错误

  1. Open NDepend
  2. Click on Analyze VS solutions and VS projects
  3. Browse
  4. Find a particular instance of a sln.
  5. Click open
  6. 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}。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆