NDepend 为解决方案中的每个项目获取第三方引用
NDepend Get Third Party references for each project in solution
对于我的解决方案中的每个项目,我想获取它使用的第三方程序集的列表。
我猜是这样的:
let landscapeAssemblies = from a in JustMyCode.Assemblies
let thirdPartyAssemblies = from a in ThirdParty.Assemblies
select new { landscapeAssemblies, thirdPartyAssemblies.UsedBy(landscapeAssemblies) }
但是(就像我的大多数 ndepend 查询一样)我收到错误 "Incomplete Query" - 我不知道该查询是如何不完整的。
我想要返回的是这样的:
Project1 :
Third Party Assembly 1
Third Party Assembly 2
Third Party Assembly 3
Project2:
etc
etc
我该怎么做?
这个查询是否满足您的需求?
from a in Application.Assemblies
let thirdPartyAsmUsed = ThirdParty.Assemblies.UsedBy(a)
select new { a, thirdPartyAsmUsed }
并且有点机敏,当您处于 diff 模式时,您可以询问应用程序的每个程序集,自 diff 基线以来新使用了哪些第三方程序集:)
from a in Application.Assemblies
where a.IsPresentInBothBuilds()
let thirdPartyAsmUsedNew = ThirdParty.Assemblies.UsedBy(a)
let thirdPartyAsmUsedOld = codeBase.OlderVersion().ThirdParty.Assemblies.UsedBy(a.OlderVersion())
let thirdPartyAsmNewlyUsed = thirdPartyAsmUsedNew.Except(
thirdPartyAsmUsedOld.Where(m=> m.IsPresentInBothBuilds()).Select(m => m.NewerVersion()))
select new { a, thirdPartyAsmUsedNew, thirdPartyAsmUsedOld, thirdPartyAsmNewlyUsed }
对于我的解决方案中的每个项目,我想获取它使用的第三方程序集的列表。
我猜是这样的:
let landscapeAssemblies = from a in JustMyCode.Assemblies
let thirdPartyAssemblies = from a in ThirdParty.Assemblies
select new { landscapeAssemblies, thirdPartyAssemblies.UsedBy(landscapeAssemblies) }
但是(就像我的大多数 ndepend 查询一样)我收到错误 "Incomplete Query" - 我不知道该查询是如何不完整的。
我想要返回的是这样的:
Project1 :
Third Party Assembly 1
Third Party Assembly 2
Third Party Assembly 3
Project2:
etc
etc
我该怎么做?
这个查询是否满足您的需求?
from a in Application.Assemblies
let thirdPartyAsmUsed = ThirdParty.Assemblies.UsedBy(a)
select new { a, thirdPartyAsmUsed }
并且有点机敏,当您处于 diff 模式时,您可以询问应用程序的每个程序集,自 diff 基线以来新使用了哪些第三方程序集:)
from a in Application.Assemblies
where a.IsPresentInBothBuilds()
let thirdPartyAsmUsedNew = ThirdParty.Assemblies.UsedBy(a)
let thirdPartyAsmUsedOld = codeBase.OlderVersion().ThirdParty.Assemblies.UsedBy(a.OlderVersion())
let thirdPartyAsmNewlyUsed = thirdPartyAsmUsedNew.Except(
thirdPartyAsmUsedOld.Where(m=> m.IsPresentInBothBuilds()).Select(m => m.NewerVersion()))
select new { a, thirdPartyAsmUsedNew, thirdPartyAsmUsedOld, thirdPartyAsmNewlyUsed }