Note that there are some explanatory texts on larger screens.

plurals
  1. POXaml compiler and designer treating clr-namespace differently
    primarykey
    data
    text
    <p>I have a very simple wpf app I built to demo a class library I built, but I am coming up on some strange behavior:</p> <pre><code>xmlns:lcl="clr-namespace:testApp;assembly=testApp" </code></pre> <p>This above is the important line, but I am including everything to be complete.</p> <pre><code>&lt;Window x:Class="testApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lcl="clr-namespace:testApp;assembly=testApp" xmlns:evt="clr-namespace:EventToCommand;assembly=EventToCommand" Title="MainWindow" Height="350" Width="525"&gt; &lt;Window.DataContext&gt; &lt;lcl:ViewModel /&gt; &lt;/Window.DataContext&gt; &lt;Label Name="lblOutput" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{Binding labelOutput}" /&gt; &lt;/Window&gt; </code></pre> <p>When I include the assembly, the designer works, and the binding on the label text works properly. However, when I go to build and run the program, I get the following error:</p> <pre><code>Error 1 The tag 'ViewModel' does not exist in XML namespace 'clr-namespace:testApp;assembly=testApp' </code></pre> <p>When I remove the assembly portion of that line, the designer stops showing me anything, but the program builds and runs perfectly.</p> <p>What is going on and how do I stop it?</p> <p>EDIT:</p> <p>Here is the top of the AssemblyInfo.cs file to show that that is the correct name:</p> <pre><code>[assembly: AssemblyTitle("testApp")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("testApp")] [assembly: AssemblyCopyright("Copyright © Microsoft 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload