Skip to content

Commit

Permalink
Deploy and redirect to System.Windows.Interactivity 4.5 (#72 and rela…
Browse files Browse the repository at this point in the history
…ted)
  • Loading branch information
tom-englert committed Apr 4, 2018
1 parent 6d38d06 commit 722e4f9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ResXManager.VSIX/ResXManager.VSIX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\System.Windows.Interactivity.WPF.2.0.20525\lib\net40\System.Windows.Interactivity.dll</HintPath>
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
Expand Down
12 changes: 12 additions & 0 deletions ResXManager.VSIX/VSPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public sealed class VSPackage : Package
public VSPackage()
{
_instance = this;
AppDomain.CurrentDomain.AssemblyResolve += AppDomain_AssemblyResolve;
}

[NotNull]
Expand Down Expand Up @@ -534,6 +535,17 @@ private void ReloadSolution()
CompositionHost.GetExportedValue<ResourceViewModel>().Reload();
}

private static Assembly AppDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
var assemblyName = new AssemblyName(args.Name);

if (assemblyName.Name != "System.Windows.Interactivity")
return null;

assemblyName.Version = new Version(4, 5, 0, 0);
return Assembly.Load(assemblyName);
}

[ContractInvariantMethod]
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Required for code contracts.")]
[Conditional("CONTRACTS_FULL")]
Expand Down
4 changes: 4 additions & 0 deletions ResXManager.VSIX/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<assemblyIdentity name="EnvDTE" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
1 change: 1 addition & 0 deletions ResXManager.VSIX/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<packages>
<package id="AutoProperties.Fody" version="1.6.0.0" targetFramework="net452" developmentDependency="true" />
<package id="DataGridExtensions" version="1.0.37" targetFramework="net452" />
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net452" />
<package id="Fody" version="2.1.3" targetFramework="net452" developmentDependency="true" />
<package id="JetBrains.Annotations" version="11.0.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
Expand Down

0 comments on commit 722e4f9

Please sign in to comment.