To illustrate the issue, I have created a simple sample project where I am getting compilation errors on the XAML definition.
Here is my class definition:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MVVMTest.Foo
{
public class FooTestClass
{
public String Name { get; set; }
public String Key { get; set; }
}
}
It should be noted that FooTestClass resides in the Foo subfolder (of the MVVMTest folder)
Here is my XAML:
<Window x:Class="MVVMTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MVVMTest"
xmlns:mView="clr-namespace:MVVMTest.Foo;assembly=MVVMTest"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<mView:FooTestClass x:Key="ddd" />
</Window.Resources>
<Grid>
</Grid>
</Window>
I'm getting the following error message
The tag 'FooTestClass' does not exist in XML namespace 'clr-namespace:MVVMTest.Foo;assembly=MVVMTest'. Line 12 Position 10.
MVVMTest C:\Dev Projects\MVVMTest\MVVMTest\MainWindow.xaml
Is there an issue in VS?