BizC#VB

FIX: Classes converted from VS2008 to VS2010 appear as Components

 

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:

  1. Open your Visual Studio Project file in Notepad.  It should be .csproj or .vbproj.  You’ll have to close Visual Studio first.
  2. Locate the reference to the file in question.  It will look like this:
  3. <Compile Include="Connection.cs">
    <SubType>Component</SubType>
    </Compile>
  4. Delete the Component subtype, so the line looks like this:
  5. <Compile Include="Connection.cs" />
  6. Rinse and repeat for each file affected.

Comments (1) -

  • mgroves
    That's weird, I haven't experienced that yet.  Any idea at all why it happens?  Some sort of attribute snafu or something?
Comments are closed
Mastodon