title: The type 'UserControl' does not support direct content
body: <p>I have an Outlook 2013 and 2016 VSTO Add-in project and am trying to add a WPF user control to a custom task pane as described <a href="https://msdn.microsoft.com/en-us/library/bb772076.aspx">here</a>.</p>
  
  <p>The problem I have is when I add the User Control (WPF) it generates me a WPF control with a grid, but automatically throws an error of "The type 'UserControl' does not support direct content".</p>
  
  <p>WPF generated:</p>
  
  <pre><code>&lt;UserControl x:Class="TestNamespace.UserControl1"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           xmlns:local="clr-namespace:TestNamespace"
           mc:Ignorable="d" 
           d:DesignHeight="300" d:DesignWidth="300"&gt;
  &lt;Grid&gt;
  
  &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>I know in the past I have had to add the WPF project type guid to the .proj file to get some things to work, but adding this made no difference (in fact it would not even load when in a certain order).</p>
  
  <p>Original:</p>
  
  <pre><code>&lt;ProjectTypeGuids&gt;{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;/ProjectTypeGuids&gt;
  </code></pre>
  
  <p>Crashes:</p>
  
  <pre><code>&lt;ProjectTypeGuids&gt;{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;/ProjectTypeGuids&gt;
  </code></pre>
  
  <p>Doesn't crash, but doesn't fix the error:</p>
  
  <pre><code>&lt;ProjectTypeGuids&gt;{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;/ProjectTypeGuids&gt;
  </code></pre>
  
  <p>Can anyone point me in the right direction?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried creating a new class library project straight out of the box, added a WPF user control, then added the reference to System.Xaml and I have the same issue.</p>