Tech Off Thread

4 posts

something.designer.cs

Back to Forum: Tech Off
  • User profile image
    SaviorBill

    Are there any resources that explain a ___.designer.cs file?

    Is this something new with Visual Studio 2012?

     

  • User profile image
    cheong

    That's the file containing code emitted by the IDE that used to produce the layout you see in WinForm Designer.

    Just take a look at it's content, there's lots of comment explaining what it's doing there.

    And AFAIK it's been like that since VS2005, when "partial class" has been introduced. Before that the screen layout had been saved in <formname>.resx file in XML format.

    Recent Achievement unlocked: Code Avenger Tier 4/6: You see dead program. A lot!
    Last modified
  • User profile image
    wkempf

    It's not just WinForms. Resx files have a "designer.cs" as well. Xaml files do something similar, but dropped the "designer" from the name. No, they are not new to VS2012 by any stretch.

  • User profile image
    spivonious

    designer files have been in .NET since I started using it - VS2005.

    You'll find them in ASP.NET web projects, WPF projects, WinForms projects, etc. They contain code that the form designer generates and shouldn't be modified directly.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.