“Can't find the .NET assembly {AssemblyName} in specified folders”

岁酱吖の 提交于 2019-12-08 08:47:14

问题


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

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:

The error won't occur in assemblies under the path C:\code\depot\Product\Stage\IA\, and will occur under C:\code\depot\Product\IA

The steps I am taking while using Visual NDepend:

  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.


回答1:


This certainly comes from problem when reading the .sln file and trying to infer the folders in which your assemblies are.

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

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.

Then you can use NDepend Project Properties > Paths referenced to define how directories paths are referenced (relative/absolute/envvar...)



来源:https://stackoverflow.com/questions/41067190/cant-find-the-net-assembly-assemblyname-in-specified-folders

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!