Silverlight user control not found in XAML but definitely specified

I recently added a management library project to my Silverlight application, so the solution now has three projects:

  • SLClient
  • SLClient.Controls
  • SLClient.Web

SLClient has a project link for SLClient.Controls, which contains the following:

  • Topics
    • Generic.xaml (contains the default CustomTextBox template)
    • Templates.xaml (contains an additional template used by CustomTextBox)
  • CustomTextBox.cs (not present in System.Windows.Controls.Control)

The above xaml files have the Action action and the Empty User Tool property. Everything builds fine, but when the XAML files (the view and my App.xaml, which merges into SLClient.Controls Templates.xaml) in SLClient are referenced by SLClient.Controls, Visual Studio reports an error in "xmlns: SLClient_Controls =" clr-namespace : SLClient.Controls; assembly = SLClient.Controls "string:

Assembly "SLClient.Controls" not found. Make sure you don’t have a reference to the assembly [...]

Update . The non-loading page that I mentioned earlier was caused by another error in my XAML. I am still getting this error, and still would like to know what causes it. Is this a bug in the XAML compiler? The code generated from the XAML compilation is excellent.

+4
source share
2 answers

If you added links to the SLClient.Controls project, then currently these assemblies will not be automatically referenced in SLClient, as expected, as in regular .NET 2.0 projects.

So, make sure that all references in the SLClient.Control project are also manually added in the SLClient project. For example, if you add a System.Windows.Toolkit link to SLClient.Control, you will also have to add the same link to SLClient.

This is a known bug, and I already reported this bug to Microsoft. And still being processed.

+1
source

sounds like a link to a hock. Try the following:

  • Remove link in project and xmlns ref in XAML.
  • Clean and rebuild all projects
  • Re-add the link to the project.
  • Build
  • Re-add the XAML xmlns link
  • Rebuild

NTN
Mark

0
source

All Articles