views:

208

answers:

2

Hello,

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 ?

A: 

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.

Adam Robinson
Ok so I have to add each COM dll to my main project even if it is already included in referenced projects ?
pebg
If it's actually included as a reference, then all you need to do is modify the publish status of the file to "Include". If it isn't included (say, if you were using functions via pinvoke), then you would have to add it manually.
Adam Robinson
Also, as a note as Timothy says you may need to select "Show All Files" in order to see it.
Adam Robinson
Sorry but I checked Show All Files and I cannot see my dlls. (I can just see the dll of my other project but not the dll including in this project ..)
pebg
If the file that you want is not in that list, then you'll need to manually add it to this project as a file (in the root directory of the project) and mark its build action as "Content". This should make it appear if "Show All Files" is selected.
Adam Robinson
A: 

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: http://stackoverflow.com/questions/261789/clickonce-overwriting-content-files

TimothyP
Ok thx I will add each files. It is the simplest solution ...
pebg