forcing subtype of a file (.csproj) RRS feed

  • Question

  • Hi,

    I want to force a file to be shown as Code, but Visual Studio always change the <SubType> in the csproj file to Component.
    This file contains a class derived from ListBox, but I don't change something on the UI, so I want it to be shown as code-file.
    So I tried to change the SubType to Code, but VS changes it after every load of the project back to Component. How can I supress this behavor?

    I'm using Visual Studio 2010 Professional

    Thanks, Daniel

    Tuesday, November 2, 2010 8:59 AM


  • Hello Daniel,

    AFAIK, this behavior can't be suppressed. VS compiler or language service will automatically identify the code's type and change its subtype.

    You can use F7 to enter its code instead of double click on it. Hope it helps.

    Looking for TFS Hot Issues? Follow us at Twitter.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, November 5, 2010 2:03 AM