2

I understand how to use the Actions and Behaviors but there is a problem I'm not sure is solvable other than to downgrade the version of .net and WPF I'm using.

I installed the latest ArcGIS SDK for WPF, version 10.2 and saw one of their examples illustrating how to use the MeasureAction. When I try to implement this in my own WPF program it won't compile and tells me that the version of Blend that MeasureAction was compiled with is different than the one I'm using. I am using the most recent Microsoft.Expression.Interactions and System.Windows.Interactivity (file version says 4.0; NOT assembly version) but in their examples they are using version 2.0 (again, file version not assembly version).

Why would Esri release a new SDK (fairly recently) and not compile it with the most current version of those assemblies? Is there a way to make this work in my project? I can't roll back to a different version of .net because I'm using Caliburn.Micro which requires the version I'm using now.

1

I figured it out. I changed my project to use .NET Framework 4.5.1 instead of 4.5 (not sure if this helped or not) and added the following to my App.config file:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <publisherPolicy apply="no" />
        <assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

This tells my project to "redirect" and use version 4.5.0.0 of the System.Windows.Interactivity no matter what version is requested. The publisherPolicy also tells my project to ignore any requirements for assembly versions imposed on it by the publisher.

This works and allows me to use Behaviors and Actions within a .NET 4.5.1 project using the ArcGIS SDK for WPF v10.2 and continue to use the most recent version of Caliburn Micro.

NOTE: the only down side I've seen so far is that the XAML editor (design view) shows "Invalid Markup" and won't show me the rendered XAML. If anyone knows how to fix this, I'm all ears.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.