针对 .NET 3.5 的 VS2010 项目是否可以发布到仅 .NET 4.0 的计算机

发布于 2024-10-04 01:18:22 字数 377 浏览 0 评论 0原文

我的任务是满足生产计算机 (Server 2008 R2) 的要求,并且想知道此项目设置是否仅适用于安装的 .NET 4.0 和用于 WCF 服务的 IIS 7。是否需要 .NET 3.5 来加载针对它的程序集?

VS2010 解决方案包含多个项目:

针对 .NET 3.5 的项目:

  • 模型 (DTO) 类
  • 业务逻辑层
  • 数据访问层
  • BLL 和 DAL 的

接口针对 .NET 4.0 的项目:

  • 包装 BLL 方法的 WCF 服务项目

在开发中,有 2.0、3.5和 4.0 安装在机器上,并且与 IIS6.0 中托管的 WCF 一切正常

I am tasked with requirements for the production machine (Server 2008 R2), and am wondering if this project setup would work with only .NET 4.0 installed and IIS 7 for WCF Service. Is .NET 3.5 needed to load assemblies that that are targeted to it?

A VS2010 solution contains several projects:

Projects targeted to .NET 3.5:

  • Model (DTO) classes
  • Business Logic Layer
  • Data Access Layer
  • Interfaces for BLL and DAL

Projects targeted to .NET 4.0:

  • WCF Service project wrapping BLL methods

In development, there's 2.0, 3.5 and 4.0 installed on the machine and everything works fine with WCF hosted in IIS6.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把梦留给海 2024-10-11 01:18:22

默认情况下,Server 2008 R2 附带安装 .Net Framework v2.0.50727,但您可以使用以下命令安装 .NET 3.5 Sp1:服务器管理器 ->特点-> .Net Framework 3.5.1 功能。我认为 .NET 4.0 客户端不足以运行你的 BLL(如果它是用 .NET 3.5 编译的)

By default, Server 2008 R2 comes with .Net Framework v2.0.50727 installed but you can install the .NET 3.5 Sp1 using: Server Manager -> Features -> .Net Framework 3.5.1 Features. I think .NET 4.0 Client is not enough to run your BLL if it's compiled with .NET 3.5

z祗昰~ 2024-10-11 01:18:22

如果其他人遇到同样的问题:

不需要 .NET 3.5,因为发布的 DLL 在仅安装 .NET2 和 .NET4 的情况下运行得很好。

针对 .NET4 的 WCF 服务无需修改或特殊配置即可在 IIS 7.0 下正常运行。

In case anyone else runs in to the same issue:

.NET 3.5 isn't required as the released DLLs run just fine with only .NET2 and .NET4 installed.

WCF Service targeted to .NET4 runs OK under IIS 7.0 with no modification or special configuration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文