Reputation: 4897
I've got a strange problem adding a dll reference. I've got a WPF application and am trying to use the WPF MDI library: http://wpfmdi.codeplex.com/
As stated in the instructions (which are very vague), I right-clicked on references in VS2012, clicked on Add reference..
, clicked on Browse..
and added my dll which I downloaded.
Next, I added the following line in the XAML of my window: xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
as stated in the instructions.
However, when trying to add an <mdi:MdiContainer>
, the following error messages are displayed:
The type 'mdi:MdiContainer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
The name "MdiContainer" does not exist in the namespace "clr-namespace:WPF.MDI;assembly=WPF.MDI".
Any ideas?
EDIT:
Added my XAML file
<Window x:Name="..." x:Class="MyClass.MyClass"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
Title="" WindowState="Maximized">
<Window.Resources>
<Style TargetType="TreeView">
<Setter Property="Padding" Value="0,0,20,0"/>
<Setter Property="BorderBrush" Value="Gray"/>
<Setter Property="BorderThickness" Value="0,0,5,0"/>
</Style>
</Window.Resources>
<mdi:MdiContainer></mdi:MdiContainer>
</Window>
Upvotes: 2
Views: 8879
Reputation: 37
Download the source for the DLL from the MDI Project. Recompile to current .net version and then re-add as a reference and recompile your project.
Upvotes: 0
Reputation: 2070
The project at MDI Project seems to use .Net 4 Client Profile. Just make sure the WPF.MDI project has been compiled using .Net Framework 4 runtime.
Upvotes: 3
Reputation: 16698
Check .NET Framework settings of your project. Make sure it is not set to .NET Framework Client Profile. Because as per my experience this error usually appears when there is a mismatch in the framework settings. Hope this helps!
Upvotes: 1