Sometimes, when you add a new library, in introduces a clashing version of System.Windows.Interactivity.dll
.
This prevents the project from working.
To fix, add an Assembly Binding Redirect by editing your app.config
to look something like this:
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity"
publicKeyToken="31bf3856ad364e35"
culture="neutral"/>
<bindingRedirect oldVersion="4.0.0.0"
newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup>
<appSettings>
<add key="TestKey" value="true"/>
</appSettings>
</configuration>
Don't worry about changing the PublicKeyToken
, that's constant across all versions, as it depends on the name of the .dll, not the version.
Ensure that you match the newVersion
in your appConfig
to the actual version that you end up pointing at: