添加没有任何“静态”组件的组件参考ClickOnce包 [英] Adding assemblies without any "static" reference into ClickOnce package

查看:57
本文介绍了添加没有任何“静态”组件的组件参考ClickOnce包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello

我们有一个基于WPF的模块化应用程序,它有完全独立的模块。我的意思是每个模块(单个.dll程序集)都可以复制到"模块"中。文件夹或刚删除,应用程序可以在运行时扫描该文件夹
现有模块。但是,由于应用程序没有对这些模块的静态引用,因此ClickOnce不会将它们嵌入到安装程序包中。如何手动将这些独立程序集注册到ClickOnce包中,以便在用户安装应用程序时,
将这些程序集复制到目标< g class =" gr_ gr_15 gr-alert gr_gramm gr_inline_cards gr_run_anim标点符号multiReplace"数据-GR-ID =" 15" id =" 15">路径。< / g>

We have a WPF based modular application and it has completely independent modules. I mean every module (which is a single .dll assembly) can be copied to the "modules" folder or just deleted and application can scan that folder at runtime for existing modules. However since the application has no static reference to those modules, ClickOnce doesn't embed them in the setup package. How can I manually register these independent assemblies into the ClickOnce package so when user install the application, those assemblies get copied to the destination <g class="gr_ gr_15 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation multiReplace" data-gr-id="15" id="15">path.</g>

提前致谢。

< g class =" gr_ gr_10 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace"数据-GR-ID =" 10" id =" 10"> Jalalx< / g>

<g class="gr_ gr_10 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="10" id="10">Jalalx</g>

推荐答案

嗨Jalal,

Hi Jalal,

尝试以下解决方案:

添加dll作为对项目的引用,然后设置"复制本地";为真:

Add the dll as a reference to your project, then set the "Copy Local" to True:

然后设置发布状态to"Include":

Then set the publish status to "Include":

如果dll仍然没有出现在"应用程序文件"中,请改为尝试:

If the dll still does not appear in the "Application Files", try this instead:


1,将DLL文件添加到项目中(右键单击项目,添加现有项目...)。将"构建操作"设置为"无"并将"复制到输出目录"设置为"不复制":

1, Add the DLL file to your project (right-click on project, add existing item...). Set 'Build action' to 'None' and set 'Copy to Output Directory' to 'Do not copy':


这篇关于添加没有任何“静态”组件的组件参考ClickOnce包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆