JohnB
JohnB

Reputation: 18962

Target .NET Framework 4 Client Profile and .NET Framework 4 (full) in the same solution

I have a Solution which contains an ASP.NET Web Application project. Web Application project types can only target the full .NET Framework 4, and Visual Studio won't let you select the Client Profile.

However, my Class Library projects in that same solution allow me to target the .NET Framework 4 Client Profile.

So, should I mix targeting the Client Profile and the full framework in the same solution? Or just target the full framework for every project type in a Solution containing a Web Application project? Or does it not matter either way?

Upvotes: 1

Views: 731

Answers (2)

ArBR
ArBR

Reputation: 4082

Applications that target the .NET Framework 4 Client Profile typically improve the deployment experience by having smaller download sizes and quicker install times. An application that targets the .NET Framework 4 Client Profile has a smaller redistribution package that installs the minimum set of client assemblies on the user's computer, without requiring the full version of the .NET Framework 4 to be present.

If your library is general purpose and the target equipment will be installed with Client Profile Framework then prefer client profile for your library, by doing this you will have smaller installers. Web Components are not included when installed Client Profile Framework.

See: http://msdn.microsoft.com/en-us/library/cc656912.aspx

Upvotes: 1

Nate
Nate

Reputation: 30636

If you plan to reuse the Class Library in a WPF or WinForms app, then Client Profile is a good choice, since you are likely going to be able to set your WPF or WinForms app to use Client Profile as well. Even if your WPF or WinForms app ends up requiring the full framework, Client Profile is a subset of the full framework so it will still work just fine.

If your reuse plans on the Class Library are WebApp only or your only using a Class Library to help segment code, then the target framework is really not important.

Upvotes: 2

Related Questions