Link in app.config

I know this question was asked before, but not in this context!

I have a WPF application (third party) that allows me to add a XAML ResourceDictionary, so I created a ClassLibrary with a class that implements the ICommand interface and calls the WebService in the Execute method.

Now I want to attach this command to the control in the application!

This is my ResourceDictionary:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:iet="clr-namespace:iETSolutions.Enterprise.WorkCenter.Controls;assembly=iETSolutions.Enterprise.WorkCenter.Controls" xmlns:custom="clr-namespace:Custom.Test;assembly=Custom.Test"> <Style TargetType="{x:Type Button}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Name}" Value="SearchButton"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Button Command="{StaticResource cmd}" CommandParameter="{Binding ElementName=SearchTextBox, Path=Text}"> <Image Source="pack://application:,,,/iETSolutions.Enterprise.WorkCenter;component/Images/PNG/iET_search.png" /> </Button> </Grid> </ControlTemplate> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </ResourceDictionary> 

So, this works like a charm, if I add my Custom.Test.dll file to the GAC, but if I try to reference the DLL from app.config, then CommandCall will fail ...

Here is what I tried in App.config to reference the assembly:

 <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Custom.Test" publicKeyToken="314daa73fc3fb7cf" culture="neutral"/> <codeBase version="1.0.0.0" href="http://localhost/Custom/Custom.Test.dll" /> </dependentAssembly> </assemblyBinding> </runtime> 

Is there any possibility I can get this to work without having to embed my custom DLL in the GAC?

For a RollingOut application, it would be much easier to have a link in App.config ...

+2
c # wpf xaml gac app-config
source share
1 answer

Have you tried to put Custom.Test.DLL in the same directory where the application executable lives?

+2
source share

All Articles