I don’t remember how this happens (I was told at one point) but sometimes, when you convert a project from VS2008 to VS2010 some classes will appear to be components. This is annoying, because when you double click to open them, they try to load in the designer, which doesn’t work at all.
To fix this:
- Open your Visual Studio Project file in Notepad. It should be .csproj or .vbproj. You’ll have to close Visual Studio first.
- Locate the reference to the file in question. It will look like this:
<Compile Include="Connection.cs">
<SubType>Component</SubType>
</Compile>
- Delete the Component subtype, so the line looks like this:
<Compile Include="Connection.cs" />
- Rinse and repeat for each file affected.