Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Using wpf 4 from a net 3 5 app


Published on

Have you had to extend a .NET 3.5 app, but wanted to use the latest toys available in WPF 4? Or just needed to mix different versions of the runtime inside the same app?

David Simner walks through an approach used by one of the Red Gate development teams to do this...

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Using wpf 4 from a net 3 5 app

  1. 1. HOWTO: Using WPF 4 (and .NET 4 in general) from a .NET 3.5 app
  2. 2. SSMS 2008
  3. 3. SSMS 2012
  4. 4. The error 15:18:11.749|Error |RedGate.SIPFramework|1 |Failed to load plugin System.BadImageFormatException: Could not load file or assembly 'file:///C:Program Files (x86)Red GateDatabase Package SSMS Plugin 1RedGate.Deploy.SqlServerDbPackage.SsmsPlugin.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
  5. 5. The “solution”
  6. 6. But…
  7. 7. The solution
  8. 8. Ingeniously simple
  9. 9. INativeHandleContract is your friend • FrameworkElementAdapters.ViewToContractAdapter • FrameworkElementAdapters.ContractToViewAdapter
  10. 10. P.S.