在同一解决方案中定位 .NET Framework 4 Client Profile 和 .NET Framework 4(完整)
我有一个包含 ASP.NET Web 应用程序项目的解决方案。 Web 应用程序项目类型只能针对完整 .NET Framework 4,并且 Visual Studio 不允许您选择客户端配置文件。
但是,同一解决方案中的类库项目允许我以 .NET Framework 4 Client Profile 为目标。
那么,我是否应该在同一解决方案中混合定位客户配置文件和完整框架?或者只是针对包含 Web 应用程序项目的解决方案中的每个项目类型的完整框架?或者两者都不重要?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的库是通用的,并且目标设备将使用客户端配置文件框架安装,那么更喜欢您的库的客户端配置文件,通过这样做,您将拥有更小的安装程序。安装客户端配置文件框架时不包括 Web 组件。
请参阅:http://msdn.microsoft.com/en-us/library/cc656912 .aspx
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
如果您计划在 WPF 或 WinForms 应用程序中重用类库,那么 Client Profile 是一个不错的选择,因为您可能也能够将 WPF 或 WinForms 应用程序设置为使用 Client Profile。即使您的 WPF 或 WinForms 应用程序最终需要完整的框架,Client Profile 也是完整框架的子集,因此它仍然可以正常工作。
如果你对类库的重用计划只是WebApp或者你只是使用类库来帮助分段代码,那么目标框架实际上并不重要。
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.