1

Using VS 2017 I found that it has grown very attached to one C# file and will constantly decorate it with:

<SubType>Component</SubType>

int the project file.

The file is just a plain vanilla C# file that has absolutely nothing special; but the IDE treats it as if it was a form.

When I remove this tag, it re-appears. When I replace the word Component by anything else, it comes back.

It does it only to this file.

A google search shows that this is a bug since VS 2015 and it was reported to Microsoft but they never fixed it; Now, with VS 2017, it's still present so I'm not hoping they'll ever fit it, but I'm curious if anyone has found a workaround for this problem?

Thomas
  • 10,933
  • 14
  • 65
  • 136
  • is this related? http://stackoverflow.com/questions/1573241/subtypedesigner-subtype-added-then-removed-by-visual-studio-on-load-unload – Claies Mar 10 '17 at 03:59
  • yes, this is the same problem; I found a bunch of posts on google, but none on SO. Looks like there is no real solution. – Thomas Mar 10 '17 at 04:01
  • Just wondering what aspect of your programming is affected by this issue? – Lei Yang Mar 10 '17 at 04:03
  • It's mostly an idea inconvenience: when you click on the file, it won't show you the source anymore as it tries to show a form; you have to right click on the file and then pick 'show source code'. FYI, the file is an async web loading module, and there is not a single form through the entire project, it compiles to a command line tool, so I can't think of any 'tag' that would hint it's a form. – Thomas Mar 10 '17 at 04:06
  • Does this answer your question? [Designer Added then removed by Visual Studio on load/unload](https://stackoverflow.com/questions/1573241/subtypedesigner-subtype-added-then-removed-by-visual-studio-on-load-unload) – StayOnTarget Jan 12 '22 at 14:00
  • @StayOnTarget, I'm not sure, that was 4 years ago and I've completely moved to Rider and dropped VS completely. – Thomas Jan 12 '22 at 14:42

0 Answers0