title: Avalonia exception "Unable to find view for <class name>"
body: <p>I have a VS solution with the following projects so that I can share UI code between iOS and Windows:</p>
  
  <ul>
  <li>MyApp.UI.Avalonia - a .NET Standard Class Library with Avalonia nuget package
  
  <ul>
  <li>contains XAML/CS files for UI</li>
  </ul></li>
  <li>MyApp.iOS - a Xamarin iOS project, with Avalonia and Avalonia.iOS nuget packages
  
  <ul>
  <li>Depends on </li>
  </ul></li>
  <li>MyApp.Windows - a Windows Application project created from the Avalonia project template (with XAML files deleted)</li>
  </ul>
  
  <p>When I run the Windows application, I get an exception in my App class at the call to AvaloniaXamlLoader.Load(this): <code>System.IO.FileNotFoundException: 'Unable to find view for MyApp.App</code></p>
  
  <p>It looks like it is failing when trying to find App.xaml, the corresponding XAML file to the App.cs file. It does so by looking for resource with URL something like "avares:/!AvaloniaResourceXamlInfo". When I debug this process in the Avalonia solution's ControlCatalog project, it does find a resource by this name in the shared ControlCatalog class library assembly, and inside that resource it finds all of the XAML files and Assets. </p>
  
  <p>A difference I notice between my project and theirs is that when I right click the project and select Add -> Item -> User Control (Avalonia), it creates a XAML file wrapping a CS file in their project, but in my project it creates the two files merely side-by-side. What project setup am I missing to get the XAML files into this magical "!AvaloniaResourceXamlInfo" resource?</p>
  
  <p><strong>Update:</strong>
  While I still get the same error, I was able to get the xaml.cs files to encapsulate the corresponding .cs files (so apparently that isn't the only issue) by adding the following to my .csproj file manually (which I found in the ControlCatalog sample project):</p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;Compile Update="**\*.xaml.cs"&gt;
        &lt;DependentUpon&gt;%(Filename)&lt;/DependentUpon&gt;
      &lt;/Compile&gt;
      &lt;AvaloniaResource Include="**\*.xaml"&gt;
        &lt;SubType&gt;Designer&lt;/SubType&gt;
      &lt;/AvaloniaResource&gt;
      &lt;AvaloniaResource Include="Assets\*" /&gt;
      &lt;AvaloniaResource Include="Assets\Fonts\*" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>