title: controls and forms missing icon and view designer option in vs2019 running SDK project with framework 4.7.2
body: <p>Summary answer so far: Forms and controls only open in the designer if csproj.user file exists.</p>
  <p>The problem story:</p>
  <p>I have 2 controls that both inherit from a base control.
  However one is missing the control icon in the solution explorer
  <a href="https://i.stack.imgur.com/4kpy1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4kpy1.png" alt="missing icon" /></a></p>
  <p>The good control source starts with</p>
  <pre><code>public partial class UniTabMaterialsControl : UnitabBaseControl
  {
      public UniTabMaterialsControl()
      {
          InitializeComponent();
      }
  </code></pre>
  <p>The bad control source starts with</p>
  <pre><code>public partial class UniTabMaterialsControl : UnitabBaseControl
  {
       
      public UniTabMaterialsControl()
      {
          InitializeComponent();
      }
  </code></pre>
  <p>The base control class is</p>
  <pre><code>public class UnitabBaseControl : UserControl
  {
  }
  </code></pre>
  <p>I have tried closing and re-opening Visual Studio</p>
  <p>[Update]</p>
  <p>I added a new user control and set it to also inherit from UnitabBaseControl , strangely the behaviour corrected.</p>
  <p>I was then able to delete the new control and maintain correct behaviour</p>
  <p>Git shows that there has been a change in UnitabBaseControl.cs but I do not see what changed other than the colour of the UserControl  text</p>
  <p><a href="https://i.stack.imgur.com/yzyMt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yzyMt.png" alt="base class colour changed" /></a></p>
  <p>I then made a fresh clone of the whole solution.
  This time the incorrect behaviour showed on all the controls that inherited from UnitabBaseControl</p>
  <p>[Update]</p>
  <p>Now I suffer the same issue with forms</p>
  <p><a href="https://i.stack.imgur.com/SSQOX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SSQOX.png" alt="form not showing correct icon" /></a></p>
  <pre><code>using System.Windows.Forms;
  
  namespace SBD.VivSnap.UI
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
      }
  }
  </code></pre>
  <p>and</p>
  <pre><code>using System.Windows.Forms;
  
  namespace SBD.VivSnap.UI
  {
      public partial class Form2 : Form
      {
          public Form2()
          {
              InitializeComponent();
          }
      }
  }
  </code></pre>
  <p>[Update]</p>
  <p>I neglected to mention that my project was a library project referred to by the start up project.</p>
  <p>I deleted and then re-added the library project reference in the start up project. Then all the forms and controls appeared correctly.</p>
  <p>I could not find any changes in Git to indicate why the solution now worked.</p>
  <p>Since then I have noticed the problem in my main project</p>
  <p><a href="https://i.stack.imgur.com/aplIh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aplIh.png" alt="problem in main project" /></a></p>
  <p>[Update]</p>
  <p>It turns out that my project is in .sdk format even though it is framework 4.7.2
  I am thinking this may have something to do with it.</p>
  <p>I am using <a href="https://stackoverflow.com/questions/62255602/how-do-i-reate-an-sdk-style-project-for-a-net-framework-4-7-2-project-in-using">Framework 4.7.2 with an sdk project</a></p>
  <p>Project Sdk=&quot;Microsoft.NET.Sdk.WindowsDesktop&quot;</p>
  <p>I checked out the code onto a different computer running VS2019 16.1.4 and it builds ok.</p>
  <p>I am using 16.11.4</p>
  <p>[Update]
  Now I have updated to 16.11.5 and cloned again but still have the problem.</p>
  <p>[Update]
  The project file is</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk.WindowsDesktop&quot;&gt;
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;net472&lt;/TargetFramework&gt;
      &lt;OutputType&gt;WinExe&lt;/OutputType&gt;
      &lt;AssemblyName&gt;Main&lt;/AssemblyName&gt;
      &lt;SolutionDir Condition=&quot;$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'&quot;&gt;..\&lt;/SolutionDir&gt;
      &lt;RestorePackages&gt;true&lt;/RestorePackages&gt;
      &lt;GenerateAssemblyInfo&gt;false&lt;/GenerateAssemblyInfo&gt;
      &lt;UseWindowsForms&gt;true&lt;/UseWindowsForms&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup&gt;
      &lt;StartupObject&gt;SBD.VivSnap.Main.Program&lt;/StartupObject&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.CSharp&quot; Version=&quot;4.7.0&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.Data.SqlClient&quot;&gt;
        &lt;Version&gt;2.0.1&lt;/Version&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore&quot;&gt;
        &lt;Version&gt;3.1.12&lt;/Version&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.SqlServer&quot;&gt;
        &lt;Version&gt;3.1.12&lt;/Version&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include=&quot;NuGet.Build.Tasks.Pack&quot; Version=&quot;5.7.0&quot;&gt;
        &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
        &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; buildtransitive&lt;/IncludeAssets&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include=&quot;System.ComponentModel.Annotations&quot; Version=&quot;5.0.0&quot; /&gt;
      &lt;PackageReference Include=&quot;System.Data.DataSetExtensions&quot; Version=&quot;4.5.0&quot; /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include=&quot;..\SnapInUI\SBD.VivSnap.UI.csproj&quot; /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Compile Update=&quot;Properties\Settings.Designer.cs&quot;&gt;
        &lt;DesignTimeSharedInput&gt;True&lt;/DesignTimeSharedInput&gt;
        &lt;AutoGen&gt;True&lt;/AutoGen&gt;
        &lt;DependentUpon&gt;Settings.settings&lt;/DependentUpon&gt;
      &lt;/Compile&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;None Update=&quot;Properties\Settings.settings&quot;&gt;
        &lt;Generator&gt;SettingsSingleFileGenerator&lt;/Generator&gt;
        &lt;LastGenOutput&gt;Settings.Designer.cs&lt;/LastGenOutput&gt;
      &lt;/None&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  <p>The csproj.user file is in my answer.</p>