I used an external library - Avalon in my VS solution's project A, and my "startup" project B had referenced project A.
Why when I compile my solution, project B return error?
Error 1 Unknown build error, 'Cannot resolve dependency to assembly 'AvalonDock, Version=1.3.3571.0, Culture=neutral, PublicKeyToken=85a1e0ada7ec13e4' because it has not been preloaded.
When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Line 89 Position 81.' C:\Net4Project\LI\LI.UI.Views\Main.xaml 89 开发者_StackOverflow81 LIMS.UI.Views
It may be due to fact that your ProjectA (Avalon) is having some missing DLL 'AvalonDock'
I don't know for sure -- but it might be because it's being loaded as reflectiononly -- have you taken a look on google for "reflectiononly"? Brings up these tips. Tricky to know whether they apply, as we don't know more about your system.
And adding a ResolveEventHandler might fix your problem ...
精彩评论