Error: Could not load file or assembly

Feb 19, 2009 at 9:12 PM
Edited Feb 19, 2009 at 9:30 PM
The demo runs great for me, but when I reference WPF.Themes.dll (and the latest version of WPFToolkit) in my app, and then add the appropriate lines to the MainWindow.xaml file, I get the following error message:


Could not load file or assembly 'file:///C:\Program Files\Attrice Corporation\Team Foundation Sidekicks\WPF.Themes.dll' or one of its dependencies. The system cannot find the file specified.


The .xaml file that's throwing the error looks like this:


<Window x:Class="WouldBeTheologian.PledgeManager.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:themes="clr-namespace:WPF.Themes;assembly=WPF.Themes"
    themes:ThemeManager.Theme="ExpressionLight"
    Title="MainWindow" Height="544" Width="629">
    <Grid>
        <Frame Name="actionFrame" Margin="155,0,0,0" />
    </Grid>
</Window>


I belive that the reference to "Team Foundation Sidekicks" is a red herring -- that's just the last directory in my PATH variable.  

To make things slightly more weird, when I apply the theme in code (C#), it appears to work:

public MainWindow()
{
InitializeComponent();
ThemeManager.ApplyTheme(this, "ExpressionLight");
}

Thoughts on why the XAML bit doesn't?

Ken