I am working on a WPF project in which I am encountering a vicious circle of bugs. At first, I get
The 'clr-namespace' URI refers to a namespace '{0}' that is not included in the assembly
I have been able to solve that issue (at first), but it introduced another error:
The name 'InitializeComponent' does not exist in the current context
However, solving that issue causes the first one again. The relevant XAML code looks like this (simplified):
<Window 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:local="clr-namespace:Main_Namespace"
Title="Client" WindowState="Maximized" MinWidth="800" MinHeight="600">
</Window>
Note that my main namespace actually has a space in it…. Maybe that that is causing the errors? I know Visual Studio (and any other code editor for that matter) is quite picky on how you name your files…
Your file is no longer linked to your code behind (hence no InitializeComponent), you have somehow managed to kill the
x:Classdirective. Not sure what to do about the spaces though…