Add Existing Item as Link:
I had a similar issue in VS2010
and I kinda ended up adding the file as Link
and updating its property to Copy Always
.
In your case, in CLIENT
project, add ThirdParty.dll
as Link
(Add > Existing Item > Add as Link) and set Copy to Output Directory
property of dll file to Copy Always
.
Note: It would copy the folder hierarchy from Project Node.
Just for Reference: I was actually using an open source LibGit2Sharp which required a dll (libGit2.dll) to be available in the output directory. Therefore, in the UI layer, which had added application layer containing LibGit2Sharp.dll
as reference; I had to add libGit2.dll
as a Link
+ Copy Always
. This was recommended solution.
Post Build:
The other option could be to write a post build scripts for CLIENT
To know how the Copy
on MSBuild
works, you could refer to Microsoft.Common.targets
file (should be available @ C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets in your system)
<Target
Name="CopyFilesToOutputDirectory"
DependsOnTargets="
ComputeIntermediateSatelliteAssemblies;
_CopyFilesMarkedCopyLocal;
_CopySourceItemsToOutputDirectory;
_CopyAppConfigFile;
_CopyManifestFiles;
_CheckForCompileOutputs;
_SGenCheckForOutputs">