WPF ClickOnce解决方案,多个项目引用不同版本的程序集

编程入门 行业动态 更新时间:2024-10-28 14:26:17
本文介绍了WPF ClickOnce解决方案,多个项目引用不同版本的程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个WPF应用程序,它在多个项目中使用第三方网格控件。在其中一个项目中,我需要将特定控件升级到最新版本,同时保留其他项目的网格控件与早期版本完好无损。 如下所述,这两个单独的项目在VS解决方案中加载,并且它们的References各自指向不同的版本... ModuleA.csproj引用ThirdPartyGrid.dll,v1.0和ModuleB.csproj引用ThirdPartyGrid, v2.0。

I have a WPF application, which utilizes a third-party grid control in multiple projects. In one of these projects, I need to upgrade a particular control to the latest version, while leaving the other project's grid control intact with the earlier version. As documented below, these two separate projects are loaded within a VS solution, and their References each point to a different version...ModuleA.csproj references ThirdPartyGrid.dll, v1.0, and ModuleB.csproj references ThirdPartyGrid, v2.0.

MainAppModule.csproj引用了ModuleA.dll和ModuleB.dll,MainAppModule是通过ClickOnce发布的项目,所以它必须也以某种方式引用第三方库。

MainAppModule.csproj has references to ModuleA.dll and ModuleB.dll, and MainAppModule is the project which is Published via ClickOnce, so it must also somehow reference the third party library.

问题:

1)MainAppModule.csproj可以以某种方式引用ThirdPartyGrid.dll的两个版本吗?在这种状态下构建解决方案时,较新版本的ThirdPartyGrid总是被复制到\\\debug \\ \\ bin文件夹。该应用程序将运行,但在尝试加载ModuleA(带旧版本参考的版本)时会抛出异常。

1) Can the MainAppModule.csproj somehow reference both versions of ThirdPartyGrid.dll? When building the solution in this state, the newer version of ThirdPartyGrid always gets copied to the \debug\bin folder. The app will run, but throws an exception when trying to load ModuleA (the one with the older version reference).

2)如果是这样,发布过程是否还需要其他步骤才能允许这样做?

2) If so, would there be any other steps needed for the Publish process to allow this as well?

  • MainApp.sln,包含:
  • MainAppModule.csproj,引用
    • ModuleA.csproj,引用ThirdPartyGrid.dll,v1.0
    • ModuleB.csproj,引用ThirdPartyGrid.dll,v2.0
    推荐答案

    你好Mike sMITH1_1,

    Hi Mike sMITH1_1,

    根据你的问题与WPF有关,我会把它移到 Windows Presentation Foundation(WPF)论坛以获得合适的支持。

    According to your question is more related to WPF, I will move it to Windows Presentation Foundation (WPF)forum for suitable support.

    本论坛讨论并询问C#编程语言,IDE,库,示例和工具。如果您对此有任何疑问,请随时与我们联系。我们将尽力为您提供解决方案。

    This forum discuss and ask the C# programming language, IDE, libraries, samples and tools. If you have any questions about this, please feel free to contact us. We will try our best to give you a solution.

    最好的问候,

    Wendy

更多推荐

WPF ClickOnce解决方案,多个项目引用不同版本的程序集

本文发布于:2023-11-08 09:31:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569007.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   解决方案   版本   程序   项目

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!