Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot find type error in XAML
Message
From
09/12/2009 08:55:55
 
 
To
All
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
Cannot find type error in XAML
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01438189
Message ID:
01438189
Views:
114
Hi,
Simple piece of XAML referencing a component in another assembly:
<UserControl x:Class="LLNet.Modules.Library.Views.Test"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:llc="clr-namespace:LLNet.Layout;assembly=Canvas">
        <ContentControl>
                <llc:LLMainCanvas/>
        </ContentControl>
</UserControl>
The assembly that this is in has a reference to the project for the 'Canvas' assembly. When this runs I get the following exception:

"Cannot find type 'LLNet.Layout.LLMainCanvas'. The assembly used when compiling might be different than that used when loading and the type is missing."

The weird thing is that simply by adding a reference to any object in the 'Canvas' assembly anywhere in code (e.g. "LLNet.Layout.LLCanvas llc;") allows this to run without a problem.

Any clues,
TIA
Viv
Next
Reply
Map
View

Click here to load this message in the networking platform