Silverlight 4 Assembly Sharing Problem
Posted
by jeffn825
on Stack Overflow
See other posts from Stack Overflow
or by jeffn825
Published on 2010-06-05T21:06:22Z
Indexed on
2010/06/05
21:12 UTC
Read the original article
Hit count: 320
I have a WPF .NET 4.0 class library referencing a Silverlight 4 class library.
The SL library compiles fine but when I compile the WPF class library, I get:
Error 2 Unknown build error, '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.' MyProj.Presentation.Wpf
I figure the problem must be similar to the one mentioned here: http://markti.spaces.live.com/blog/cns!D92CF278F0F91957!273.entry
but my WPF library doesn't contain any XAML that references a user control from my SL library. In fact, my SL library doesn't have any XAML in it at all. It does, however, have several shared DependencyObjects, such as an EventCommander (binding UI element events to Commands), and some DataTemplate helpers.
Is there any way I can narrow down the problem here? And has anyone found a way of effectively referencing UI elements in a SL4 project from .NET 4.0?
Thanks.
© Stack Overflow or respective owner