As the titel say i have the problem that Xaml don´t now my clr namespace, I read the other posts and tried their solution without any success, I rebuild, Start as Admin tried the build conviguration etc.
My Project looks so:
My XAML:
<Controls:MetroWindow x:Class="AdminControlCenter.View.MainView"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:resx="clr-namespace:AdminControlCenter.Properties;assembly=AdminControlCenter"
xmlns:local="clr-namespace:AdminControlCenter;assembly=AdminControlCenter"
xmlns:vm="clr-namespace:AdminControlCenter.ViewModel;assembly=AdminControlCenter"
Title="MainWindow" Height="400" Width="600">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="White">
<Grid.DataContext>
<vm:ImageViewModel x:Name="imageViewModel"/>
</Grid.DataContext>
And the Error:
And the ImageViedModel:
namespace AdminControlCenter.ViewModel
{
public class ImageViewModel : ViewModel
{
public ImageViewModel()
{
}
.....
The classes are public and show up at the autoformat, when I type for example "vm:" It also go to the Definition of the Class by using F12.
When I use some MVVM tutorial tests, they are working. But when I try in my Project all ViewModels are not found.
Why doesen´t found the XAMl my ViewModels ?
Edit: I tried every variation of the assemblies with and without, I also try to delete the suo and try every build configuration, and I restart VS as Admin etc. I also make a new Project with another name and rewrite all classes (Not Copied them) also without any success