简体   繁体   中英

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 Settings\\Apps\\2.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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM