MsBuild does not look in the good directory for custom task's second-level dependencies

你。 提交于 2019-11-30 20:59:39

You might try the Fusion Log Viewer (fuslogvw.exe, installed with VisualStudio) to see which paths are being searched for the assemblies. You may find another folder that can be used instead.

If dep1 and dep2 are third-party assemblies or internal ones that won't change, you could always throw them in the GAC. This is something I generally avoid on a build server, but if you are only using them for build helpers and not production installs it shouldn't be an issue.

Edit: The partial bind might be the cause. Are you using Assembly.Load to use ProjA? From the logs you provided, it looks like it is failing to load ProjA - it is not getting far enough to even try loading dep1 or dep2.

There are a couple of work arounds that I could sugest.

  1. ILMerge this will allow you merge several Assemblies together, into one assembly.

  2. You can add the secondary refence to your solution even though you are not using it, this would copy it to your bin folder.

  3. create another Target to run after the compile to copy the missing Assembly to the folder

Hope this helps.

Iain

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