<Subtype>Designer</Subtype> Added then removed by Visual Studio on load/unload

Jeff Lundstrom picture Jeff Lundstrom · Oct 15, 2009 · Viewed 45k times · Source

Anyone see this before? I have a large Visual Studio project that keeps adding [Subtype]Designer[/Subtype] to my .vcproj then removing it on the next open and close of the project. There is only one class defined in StoredImageControl.cs. Anyone know how to shut this off as it is really messing up my revision control.

This is before:

<EmbeddedResource Include="StoredImageControl.resx">
  <DependentUpon>StoredImageControl.cs</DependentUpon>
</EmbeddedResource>

This is after

<EmbeddedResource Include="StoredImageControl.resx">
  <DependentUpon>StoredImageControl.cs</DependentUpon>
  <SubType>Designer</SubType>
</EmbeddedResource>

Answer

Nathan Reed picture Nathan Reed · Nov 8, 2011

This might be related to what files you have open in the saved solution state. I ran into this problem in VS2010 and found that if I close the solution while an .xml file was open in the editor, then on the subsequent re-open of the solution, the project containing that .xml file would get this <SubType>Designer</SubType> line added. If I close the solution without that file open, though, it does not try to add that line on the following re-open.