ClickOnce & References

I have created a ClickOnce Solution with VS2008. My main project references another project who references COM dll as "links".

When I build my solution in VS the dlls from the orther projects are moved in my bin folder but when I publish and launch the project these files are not presents in my Local SettingsApps2.0... folder.

I know that I can add each dll of the other project as a reference of my main project but I'd like a cleaner solution ...

Is it possible ?


First add those files to your project directly. Then goto Application properties -> Publish -> Application files

Select "show all files" if you do not see the files you need and then set their publish status to "Include" NOT "Include (Auto)". This is important or they will not be added.

Please note if you update the files, you will have to remove them and add them again and set their publish Status again. This is a small bug.

See a previous question of mine for more info: ClickOnce - Overwriting content files


You need to open the "Application Files" dialog in the Publish tab of your project. From there you can set the publish type (Include, Prerequisite, etc.) of each of your files.

If it's an unmanaged DLL, you'll need to add the actual .dll as a file to your project and mark its build action as "Data". You can then set the Publish Type of that file to Include.


I had the same issue.... and the only way to fix this after going through many options, was by adding those dlls to References.

It works, but I hope there would be a cleaner solution to it in future.

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

上一篇: ClickOnce部署,但未部署引用的DLL文件

下一篇: ClickOnce&References