I recently added a control library project to my Silverlight app's solution, so the solution now has three projects:
- SLClient
- SLClient.Controls
- SLClient.Web
SLClient has a project reference to SLClient.Controls, which contains the following:
- Themes
- Generic.xaml (contains default CustomTextBox template)
- Templates.xaml (contains additional template used by CustomTextBox)
- CustomTextBox.cs (Descended from System.Windows.Controls.Control)
The xaml files above have Build Action of "Resource" and an empty Custom Tool property. Everything builds fine, but when the XAML files (a view, and my App.xaml that merges in SLClient.Controls's Templates.xaml) in SLClient that reference SLClient.Controls are open, Visual Studio tells shows an error in the "xmlns:SLClient_Controls="clr-namespace:SLClient.Controls;assembly=SLClient.Controls" line:
Assembly "SLClient.Controls" was not found. Verify that you are not missing an assembly reference [...]
Update: The page not loading, which I had previously mentioned, was caused by a different error in my XAML. I still get this error though, and would still like to know what's causing it. Is it a bug in the XAML compiler? The code generated from the XAML compiles fine.