数据文件 (dll) 未使用 ClickOnce 部署

发布于 2024-12-10 11:06:33 字数 167 浏览 0 评论 0原文

我有一个使用 ClickOnce 部署的 winform 应用程序。它有一些库,存储在子文件夹 (AppRoot\Apps) 中,我在发布属性中用数据文件状态标记了这些库,并且应用程序的发布工作正常。 但是,当部署应用程序时,所有库都部署正常,只有一个库除外,我现在不知道为什么。

任何人都可以帮助我吗?

I've a winform app deployed with ClickOnce. It has some librarys, stored in a subfolder (AppRoot\Apps), that I've marked with Datafile status in the publishing properties, and the publication of the application works allright.
But when the application is deploying, all of the libraries deploy ok but one, and I can't now why.

Anyone can help me, please?

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

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

发布评论

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

评论(1

浊酒尽余欢 2024-12-17 11:06:33

它们是什么类型的文件,为什么将它们部署为数据文件?

如果它们是您引用的程序集,您的引用是否指向文件夹中的程序集?您应该这样做: 将文件放入文件夹中。对于属性,将“构建操作”设置为“无”,并将“复制到输出目录”设置为“不复制”。删除现有的引用。重新添加每个引用,然后浏览到项目中该文件夹中的程序集。在引用上,将“复制本地”设置为 true。

如果它们是您没有引用的程序集,只需将构建操作设置为“内容”并将“复制到输出目录”设置为“始终复制”。数据文件也应如此设置。

如果你搞乱了Application Files中的设置,请注意,如果你将它们设置为Data,并且它们的文件扩展名为XML、SDF、MDB等,它们将被部署到ApplicationDeployment.DataDirectory文件夹,而不是到与可执行文件和其他文件相同的文件夹。您可以通过在“应用程序文件”对话框中将其从“数据”更改为“包含(必需)”来覆盖此设置。

What kind of files are they, and why are you deploying them as data files?

If they are assemblies that you have references to, do your references point to the assemblies in the folder? You should do this: Put the files in the folder. For properties, set "Build Action" to "None" and set "Copy to Output Directory" to "Do not copy". Delete existing references. Re-add each reference, and browse to the assembly in that folder in the project. On the reference, set "copy local" to true.

If they are assemblies that you do not have references to, just set the build action to "Content" and set "copy to output directory" to "copy always". This is how data files should be set as well.

If you mess around with the settings in Application Files, be aware that if you set them to be Data, and they have a file extension of XML, SDF, MDB, etc., they will be deployed to the ApplicationDeployment.DataDirectory folder, not to the same folder as the executable and other files. You can override this by changing it from Data to Include(Required) in the Application Files dialog.

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