locked
VS2010: WinForm projects always target .NET Framework 4 Client Profile RRS feed

  • Question

  • Every time I add a WinForm project, I select .NET Framework 4 as Target Framework but they are created as .NET Framework Client Profile instead.
    Why is this?

    • Edited by arm2000 Wednesday, May 26, 2010 4:41 PM
    Tuesday, May 25, 2010 6:19 PM

Answers

  • I believe a core reason for the client profile is to provide a smaller, client-focused version of the .NET Framework that can be used by client applications in deployment scenarios where a smaller installation size is important. This blog post sums up the reasoning behind the client profile pretty well. 

    I'm assuming that the client profile was chosen as the default for Windows Forms because most Windows Forms applications are client-side applications that don't require access to features like ASP.NET. I will forward your feedback to the Visual Studio team that owns the experience for creating new projects. You can also open a feature request on this in Connect (there is no promise of getting this changed, but I can guarantee that the product team will see your bug and respond to it one way or another, and the more customer feedback they receive on a given issue the more likely they are to change it).


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by arm2000 Wednesday, May 26, 2010 8:37 PM
    Wednesday, May 26, 2010 8:29 PM

All replies

  • Are you using a beta version?

    Mark the best replies as answers. "Fooling computers since 1971."
    Tuesday, May 25, 2010 6:28 PM
  • No, but I used one before
    Tuesday, May 25, 2010 6:54 PM
  • Are you certain that you did the delete on the beta properly and completely?

    Mark the best replies as answers. "Fooling computers since 1971."
    Tuesday, May 25, 2010 7:15 PM
  • Well, I just uninstalled from Control Panel. The uninstall process went smoothly. Is this properly and completely?
    Tuesday, May 25, 2010 7:37 PM
  • http://social.msdn.microsoft.com/Search/en-US?query=uninstall%20visual%20studio%202010%20beta&ac=3

    Probably not.  Cross your fingers.  Backup your installed programs and data files.  Might be time to take that month long honeymoon with your personal computer that you always dreaded experiencing.
    Mark the best replies as answers. "Fooling computers since 1971."
    Tuesday, May 25, 2010 7:44 PM
  • The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications and it enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.

    Several project templates in Visual Studio 2010 target the .NET Framework 4 Client Profile. The following is a list of some project templates in Visual Studio 2010 that target the .NET Framework 4 Client Profile by default:

    • WPF Application

    • WPF Browser Application

    • WPF Custom Control Library

    • WPF User Control Library

    • Windows Forms Application

    • Windows Forms Control Library

    • Console Application

    • Empty Project

    • Window Service

    You may read a lot more on the .Net framework client profile here.

    For other topics you are welcome to my blog.

    Janiv Ratson.

     

     


    Janiv Ratson. Technology and Development Expert. | BL: http://blogs.microsoft.co.il/blogs/janiv/ | LI: http://www.linkedin.com/in/janiv | TW: http://twitter.com/janiv
    Tuesday, May 25, 2010 9:33 PM
  • Yes, but I specifically choose NET Framework 4 and not NET Framework 4 Client Profile. BTW, I don't know what you mean "by default": when I create a Windows Forms App project the default (displayed) target is NET Framework 4 and not NET Framework 4 Client Profile
    Wednesday, May 26, 2010 2:28 PM
  • http://social.msdn.microsoft.com/Search/en-US?query=uninstall%20visual%20studio%202010%20beta&ac=3

    Probably not.  Cross your fingers.  Backup your installed programs and data files.  Might be time to take that month long honeymoon with your personal computer that you always dreaded experiencing.
    Mark the best replies as answers. "Fooling computers since 1971."

    As a matter of fact, I checked again the installed programs and it seemed that it was something left from the Beta, a Redistributable for C++ (which I never used). I removed that, I ran again the setup with repair option, but still no luck. I followed some of the links you provided but I couldn't find a good match for my problem. Do you think a full reinstall and re-install of VS2010 will help?
    Wednesday, May 26, 2010 2:33 PM
  • Hi,

    This is very interesting. I use VS2010 (premium). When I add a .NET Framework 4 Windows Forms Application, it always targeted to the .NET Framework 4 Client Profile.

    To change its default and target to the .NET full framework 4, I follow the following steps (as linked at the end of my blog post):

    1. In Visual Studio, open the project you want to change.

    2. Right-click the project in Solution Explorer and then click Properties.

    3. In the Project Designer, locate the Target Framework list, as follows:

    4. For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).

    5. In the Target Framework list, select a .NET Framework version or profile that differs from the current one for the project.

    6. When you click OK, the project unloads and then reloads in the integrated development environment (IDE). The project now targets the .NET Framework version that you just selected.

    BTW:

    1. Express Editions of Visual Studio do not allow the choice of .NET Framework versions or profiles when initially creating a project. You can later retarget the project to any installed .NET Framework version.

    2. Visual Studio 2010 includes only the .NET Framework 4. To target earlier versions of the .NET Framework, you must have the .NET Framework 3.5 SP1 installed. To download and install the .NET Framework 3.5 SP1, see Microsoft .NET Framework 3.5 Service Pack 1 on the Microsoft Download Center Web site.

    Please let me know if it worked for you.

    Thanks,
    Janiv Ratson.

     


    Janiv Ratson. Technology and Development Expert. | BL: http://blogs.microsoft.co.il/blogs/janiv/ | LI: http://www.linkedin.com/in/janiv | TW: http://twitter.com/janiv
    • Edited by janiv Wednesday, May 26, 2010 2:44 PM mispelling
    Wednesday, May 26, 2010 2:43 PM
  • Once again, what do you mean with "by default" ?
    Wednesday, May 26, 2010 3:02 PM
  • I mean automatically.

    I add a new Windows Forms Application to my solution and it is automatically targeted to .NET Framework 4 Client Profile, without me setting it.

    Janiv Ratson.


    Janiv Ratson. Technology and Development Expert. | BL: http://blogs.microsoft.co.il/blogs/janiv/ | LI: http://www.linkedin.com/in/janiv | TW: http://twitter.com/janiv
    Wednesday, May 26, 2010 3:09 PM
  • Once again, what do you mean with "by default" ?


    That means the application will make an initial choice for you. 

    This is commonly done to guide users in the right direction, or the simplest direction.


    Mark the best replies as answers. "Fooling computers since 1971."
    Wednesday, May 26, 2010 3:14 PM
  • So you can't change it from the Target Framework drop-box when you create the project?
    Wednesday, May 26, 2010 3:19 PM
  • After you create the project you may change it. The way to change it may be found here as mentioned in my blog.

     


    Janiv Ratson. Technology and Development Expert. | BL: http://blogs.microsoft.co.il/blogs/janiv/ | LI: http://www.linkedin.com/in/janiv | TW: http://twitter.com/janiv
    Wednesday, May 26, 2010 3:24 PM
  • So why can't you change it, it's not displayed in the drop-down list or it doesn't work?
    Wednesday, May 26, 2010 3:31 PM
  • I didn't yet receive any confirmation from Janiv, but what he describes seems to be like what I experience.
    So it appears that this is actually a VS2010 bug. Anyone else confirming it?

    Wednesday, May 26, 2010 4:44 PM
  • What you are seeing is by design, not a bug. When you create a project, only the .NET Framework "versions" (.NET Framework 4, .NET Framework 3.5, etc.) are listed in the drop-down in the New Project dialog box. When you select one of these framework versions, some project types default to a particular "profile" of the selected version. The targeted "profile" cannot be changed here - if you want to change to a different "profile" of the target framework, you must do this in the project properties as described earlier in this thread. 

    Windows Forms projects default to the client profile if you target the .NET Framework 4, as do certain other project types, since the client profile contains all of the assemblies/features that are typically used in these projects. For a full list of the project types that target the client profile by default, see the "Project Templates that Target the .NET Framework Client Profile" section in http://msdn.microsoft.com/en-us/library/cc656912.aspx. This topic also calls out the features that are not available in the client profile; you should only have to change to the full .NET Framework 4 if you need to use one of these features.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, May 26, 2010 7:25 PM
  • Then it's a bad design. First of all, I don't understand why I can't choose the profile when I create the project, why do I have to do a separate step after?Second, I don't understand the reason of this profile, with its restrictions. I need to use/share (mine or third party) components built for NET Framework 4 not for Client Profile. It should definitely allow me to choose what I want from the beginning, not force me to use some arbitrary defaults and then make changes

    Wednesday, May 26, 2010 7:40 PM
  • I believe a core reason for the client profile is to provide a smaller, client-focused version of the .NET Framework that can be used by client applications in deployment scenarios where a smaller installation size is important. This blog post sums up the reasoning behind the client profile pretty well. 

    I'm assuming that the client profile was chosen as the default for Windows Forms because most Windows Forms applications are client-side applications that don't require access to features like ASP.NET. I will forward your feedback to the Visual Studio team that owns the experience for creating new projects. You can also open a feature request on this in Connect (there is no promise of getting this changed, but I can guarantee that the product team will see your bug and respond to it one way or another, and the more customer feedback they receive on a given issue the more likely they are to change it).


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by arm2000 Wednesday, May 26, 2010 8:37 PM
    Wednesday, May 26, 2010 8:29 PM
  • OK, thanks
    Wednesday, May 26, 2010 8:37 PM
  • I know I am a little late to this thread, but I would like to chime in since this is where the search engine brought me.

    In my specific case, this is bad for our customers. We create a .net toolkit for telephony applications, and because by default any forms project will target the .net 4 client profile, none of our controls will load into the toolbox (in a FW 4.0 project), even using our own project template.

    As I see it there are 2 problems.

    1) The "New Project" window describes the target as ".NET Framework 4" when what you are actually getting is ".NET Framerwork 4 Client profle" as descrbied in the project properties.

    2) You cannot choose between ".NET Framework 4 Client Profile" and ".NET Framework 4" from the "New Project" window. You must create your project first, and then change the target after the fact.

    This is non-intuitive, incorrectly described and a behavior different then previous versions of Visual Studio. It takes some time to realize where the problem is, and after you know, it is still not a user friendly way of doing things. (create project first, change target framework after)

    Thanks


    CNA3 Certified :)
    Tuesday, June 22, 2010 5:43 PM
  • As with OrionStyles...a search brought me here.....

    Please fix this.... The default should be .Net 4....not a sub set....if I want a sub set I'll ask.

    This is especial irritating as I will never, yes really NEVER, build against the Client Profile...ever.

    Rusty.

     

    Friday, July 2, 2010 4:57 PM
  • OrionStyles: Is there any reason that your .NET toolkit can't itself target the .NET Framework Client Profile? That way, it will appear in the toolbox for both Client and Full.
    Base Class Library Team (BCL) | My Blog: http://davesbox.com
    Thursday, July 8, 2010 10:30 PM
  • I completely agree, this is a massive irritation. It's not like there is even one step that lets you just switch between the Client Profile and the Full framework either. 

     

    It's annoying when it defaults to the client framework for standard projects but even more so in Setup projects, I can't count the number of times I've seen this catch people out.

    Who here hasn't seen the message:

    "The version of the .NET Framework launch condition '.NET Framework 4 Client Profile' does not match the selected .NET Framework bootstrapper package. Update the .NET Framework launch condition to match the version of the .NET Framework selected in the Prerequisites Dialog Box."

    A poor design decision supported by the fact that I'm yet to find anyone that has commented favourably on this 'feature' and it obviously slows RAD development.

     

    Please just provide the choice up front.

    Friday, June 17, 2011 9:18 AM
  •  

    I completely agree, this is a massive irritation. It's not like there is even one step that lets you just switch between the Client Profile and the Full framework either. 

     

    It's annoying when it defaults to the client framework for standard projects but even more so in Setup projects, I can't count the number of times I've seen this catch people out.

    Who here hasn't seen the message:

    "The version of the .NET Framework launch condition '.NET Framework 4 Client Profile' does not match the selected .NET Framework bootstrapper package. Update the .NET Framework launch condition to match the version of the .NET Framework selected in the Prerequisites Dialog Box."

    A poor design decision supported by the fact that I'm yet to find anyone that has commented favourably on this 'feature' and it obviously slows RAD development.

     

    Please just provide the choice up front.

     


    Add me to this list of poor design.
    tom kelly
    Monday, August 29, 2011 6:34 PM