.NET4:进程内并行执行解释

发布于 2024-08-30 19:47:06 字数 1018 浏览 2 评论 0原文

概述:我有兴趣了解有关程序集的 .NET4“进程内并行执行”的更多信息,并且需要其他信息来帮助我揭开它的神秘面纱。

动机:相关应用程序是针对 .NET2 构建的,并使用两个也适用于 .NET2 的第三方库。该应用程序(通过文件复制)部署到包含 .NET2 的虚拟环境中的客户端计算机。 这不是我的架构,请耐心等待。

目标:看看是否可以针对 .NET4 重建应用程序集(或子集),并像以前一样发布应用程序,无需更改第三方库并在部署。

采取的步骤:阅读了以下文章,但没有为我提供足够的信息:

  1. 进程内并行执行:浏览了这篇文章,场景二最接近地描述了与我的情况类似的情况,但并没有真正涵盖任何深度。

  2. ASP.NET 并行执行概述:这文章介绍了一个 Web 应用程序,但我正在处理客户端 WinForms 应用程序。

  3. CLR 团队博客:In-Process Side-by-Side:这对于解释托管进程的插件如何在 .NET4 下运行很有用,但我不知道这是否适用于第三方库。

进一步步骤:我还不清楚如何继续将单个 .NET2 程序集升级到 .NET4,并将可执行文件保留在 .NET2 中(即如何配置解决方案/项目文件,如果有任何特殊情况)需要包含代码等)。

Overview: I'm interested in learning more about the .NET4 "In-Process Side-by-Side Execution" of assemblies, and need additional information to help me demystify it.

Motivation: The application in question is built against .NET2, and uses two third-party libraries that also work against .NET2. The application is deployed (via file copy) to client machines in a virtual environment that includes .NET2. Not my architecture, please bear with me.

Goal: To see if it's possible to rebuild the application assemblies (or a subset) against .NET4, and ship the application as before, without changing the third-party libraries and including the .NET4 Client Profile (as described here) in the deployment.

Steps Taken: The following articles were read, but didn't quite provide me enough information:

  1. In-Process Side-by-Side Execution: Browsed this article, and Scenario Two is the closest it comes to describing something that resembles my situation, but doesn't really cover it with any depth.

  2. ASP.NET Side-by-Side Execution Overview: This article covers a web application, but I'm dealing with a client WinForms application.

  3. CLR Team Blog: In-Process Side-by-Side: This is useful to explain how plug-ins to host processes function under .NET4, but I don't know if this applies to the third-party libraries.

Further Steps: I'm also unclear on how to proceed upgrading a single .NET2 assembly to .NET4, with the executable remaining in .NET2 (i.e. how to configure the solution/project files, if any special code needs to be included, etc.).

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

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

发布评论

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

评论(1

幸福%小乖 2024-09-06 19:47:06

通常,您可以在 .NET 4 运行时加载针对 .NET 2 创建的程序集。所以你应该先尝试一下,看看它是否“有效”。只需将您的应用程序隐藏到 VS 2010 / .NET 4,并尝试使用对第三方程序集的相同引用来编译它。然后部署,它可能会起作用。

In general, you can load assemblies created against .NET 2 in the .NET 4 runtime. So you should try this first and see if it "just works". Just covert your app to VS 2010 / .NET 4, and try to compile it with the same references to the third party assemblies. Then deploy and it will probably work.

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