CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009
    Posts
    109

    [RESOLVED] Unable to choose 'Windows Form Application' in VS 2010

    Ok so here's the thing. I've had VS2010 installed for a long time now. And I usually only work with Windows Forms Applications of Web Applications. But today, when I tried to create a new project by going to File>New>Project>Visual C#>Windows, I was unable to find Windows Forms Application. Anyone know the reason behind this?

    I'm able to see Windows Forms Control Library as and option, but Windows Forms Application is not shown there.

    Can someone help me with this problem?

    PS: I tried searching google but I'm not able to find any solutions. And I'm sure it's because I'm using the wrong keywords.

  2. #2
    Join Date
    Jan 2010
    Posts
    1,133

    Re: Unable to choose 'Windows Form Application' in VS 2010

    Try this: Recovering Missing Templates in Visual Studio

    If that doesn't work for some reason, you can do a workaround:
    • Create a WinForms Control Library project.
    • Delete UserControl1.cs.
    • Go Project > Add Windows Form
    • Open Form1.cs (or WhateverName.cs) code view, and add this to your form class as a static member method:

    Code:
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());   // Replace Form1 with your form name, if you named it differently
            }

  3. #3
    Join Date
    Dec 2009
    Posts
    109

    Re: Unable to choose 'Windows Form Application' in VS 2010

    Alright you're first method worked. However, instead of Microsoft Visual Studio 9.0, I used 10.0. Actually I used 'devenv.exe/installvstemplates' in both folders.

    Thanks a lot bud. Now I can get on with learning how to build different kinds of apps. First off, a simple notepad.
    Cheers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured