Missing dll when deploying ClickOnce

When I publish a ClickOnce application, one of the references that is included in one of my projects is missing.

If I go to my project's Properties -> Application Files, this missing reference is not even listed here.

My bin/Release folder has an .exe.manifest file, and I noticed it that it is also missing from here.

However, when I build the project, the DLL is in fact copied to my bin/Release folder.

How can I ensure it also deploys this required dependency?


I finally found a solution for this problem and I hope it will solve your problem to. In my case, I'm editing an old application at work which have multiple projects, but the main project and it's back end project are the most important here. The back end is added in the References section of the main project. In the back end, a third party dll was imported, but this dll requires 2 other dlls. So those 3 dlls were added in the References section of the back end project.

At that point, one of the 2 other dlls was not showing in the Application Files section for ClickOnce. I've come up with a couple of ways of fixing it, but the most elegant one was to add this dll in the Reference section of the main project.


As stated in How to: Specify Which Files Are Published by ClickOnce, change the Copy Local property value on the reference to True.

References to assemblies (.dll files) are designated as follows when you add the reference: If Copy Local is False, it is marked by default as a prerequisite assembly (Prerequisite (Auto)) that must be present in the GAC before the application is installed. If Copy Local is True, the assembly is marked by default as an application assembly (Include (Auto)) and will be copied into the application folder at installation. A COM reference will appear in the Application Files dialog box (as an .ocx file) only if its Isolated property is set to True. By default, it will be included.

链接地址: http://www.djcxy.com/p/11306.html

上一篇: 如何将内部文本插入空的xml元素?

下一篇: 部署ClickOnce时缺少dll