Hi,
I have a solution that is deployed using ClickOnce.
It consists of an application, serveral referenced assemblies and a SQL Server Compact database.
There is also an assembly which is not referenced by the main application, but simply loaded at runtime. This assembly needs to be deployed along with the application, in the same directory as the application binaries.
I set up Visual Studio to copy the "plugin" assembly to the \bin\debug (or \bin\release) directory of the UI project after compilation.
I then added the file to the UI project, not as a reference but simply as a file. I set the build action to "Content", this way it shows up in the Properties/Publish dialogs of the UI project.
When I first published the application, it worked like a charm. But then I updated the plugin assembly, even gave it a different version number and published again, only to find the assembly had not been updated but the first one ever uploaded was still being used. (Even on a clean computer with no prior install).
I did some digging and found that the assembly (LibComposites.dll) was copied to both the directory where clickonce applications store their binaries as the directory where they store the data files.
In both cases, the first ever published version.
In overview, I have an application that references some assemblies:
Control.exe references --> LibLLC.dll, LibDataLayer.dll, LibLLCExtenders.dll
loads at runtime --> LibComposites.dll (which also references LibLLC.dll)
I need to deploy a new version of LibComposites.dll to the same directory as the application witch each publish.
Why is the first ever published version of that assembly still being used
How can I force LibComposites.dll to be overwritten by every publish?