1

Im in a page and want to reference some converters I created in the very same xaml.cs file. This is my header

<Page x:Class="recoveR.paradigmSelector"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
  mc:Ignorable="d"
  d:DesignHeight="768" d:DesignWidth="1366"
Title="paradigmSelector" Loaded="Page_Loaded" 
  xmlns:my="clr-namespace:recoveR;assembly=StimulationSwitcher" 
  xmlns:my1="clr-namespace:recoveR;assembly=ExerciseChooser"
  xmlns:local="clr-namespace:recoveR">  <---- Adding this reference

As you can see from he header, im in the recoveR namespace, and this is the paradigmSelector page, but when setting the reference to the local xmlns:local="clr-namespace:recoveR" it complaines saying: Error 45 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'recoveR' that is not included in the assembly.

There is the header of the xaml.cs file just in case it is useful:

using System;
using System.Collections.Generic;
using System.Linq;
// other usings

namespace recoveR
{
   public partial class paradigmSelector : Page
   {
      // my codes here
   }
}

Tried

xmlns:local="clr-namespace:recoveR;assembly=RecoveR"
xmlns:local="clr-namespace:recoveR;"

none worked

Please notice that xmlns:my1="clr-namespace:recoveR;assembly=ExerciseChooser" did included correctly the reference (it is a user control I created) so the namespace is definitely there, despite what the error says.

EDIT

I noticed that if I write xmlsn:local=" and let the autocompletion works, it even offers clr-namespace:recoveR. Written in the same way I tried in my first attempt. Even when choosing from the autocompletion, it does not work.

javirs
  • 1,191
  • 17
  • 44

0 Answers0