Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I just downloaded PoshConsole's source code and was trying to build the solution. I initially had two problem -

  1. the System.Interactivity.dll could not be resolved. I installed Blend 4 SDK and that issue was fixed.

  2. Unknown build error - Cannot resolve dependency to System.Windows

Right now, whenever I try to build the project, I get the following error in two projects in the solution and I haven't been able to find a solution after some googling around.

Cannot resolve dependency to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
153 views
Welcome To Ask or Share your Answers For Others

1 Answer

I have received this error message for another (non-GAC, custom) assembly.

In my case, the situation was as follows:

  • assembly X contains class A
  • assembly Y contains class B, which inherits from A
  • assembly Z contains a data template for class B

Y referenced X, Z referenced Y.

The error message was pointing to the line in the data template in Z where B was referenced, and pointed out that X could not be loaded.

The solution was to have Z also reference X. Apparently, the compiler cannot resolve that transitive reference for loading the required assemblies on its own.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...