I am working through an MVVM tutorial, and I have the following code, written in Xaml:
<Window x:Class="WPFMVVM.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPFMVVM; assembly=WPFMVVM"
Title="MainWindow" Height="388" Width="545">
The xmlns:local line is complaining saying that WPFMVVM assembly is not referenced. Although it is the assembly that I am working in.
Anybody know why?
Thanks
You must not have spaces in there & if it's the assembly you work in just do not specify assembly
.
xmlns:local="clr-namespace:WPFMVVM"
The assembly
parameter is for referenced assemblies. Also see the MSDN article on XAML namespaces.
assembly can be omitted if the clr-namespace referenced is being defined within the same assembly as the application code that is referencing the custom classes. Or, an equivalent syntax for this case is to specify assembly=, with no string token following the equals sign.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With