1
votes

I downloaded The ESRI WPF SDK and the all necessary stuff for it and installed it.

I downloaded the interactive sample Application that they provide. Opened the solution for the first time and the build went without any problems.

Several days later I did not want to compile. First it could not resolve the System.Windows.Interactivity dependency. After solving it I got the following error.

Build error:

Error 1 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.' ArcGISWPFSDK

OutputWindow:

------ Build started: Project: ArcGISWPFSDK, Configuration: Release Any CPU ------ C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets(268,9): error MC1000: 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.' ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

For the last 5 days I am googeling this error but nothing works. Please, help someone. I am loosing my mind.

This are the WPF sampels

1
Which .net framework version are you targeting in your projects? Sounds like some of the projects in your solution may have the wrong application options selected.Matt Ringer
It is one project in the whole solution. .NET 4.0 (not client profile)user853710
Are any of your 3rd party libraries using a DI container that needs to be configured for it to resolve dependencies?Matt Ringer
nope. the ones that the ESRI sdk provides onlyuser853710
Do you have a reference to 'System.Windows' in the References for the sample project? Sounds basic, but everyone in a while I'll have to re-add references that haven't changed.Matt Ringer

1 Answers

1
votes

Found it.

For some stupid reason, The Blend SDK did not want to install the WPF components, but only the Silverlight dependancies.

When I was adding the interactivity.dll reference I was "searching" for it and just coppied the path. Since there was only one present I assumed it must have been the needed one.

This error says that in a WPF application I am trying to use a silverlight dll