Currently I am using a post-build event command line similar to this one:
xcopy /Y /R d:\svn\some\directory\somedll.dll $(TargetDir)
The problem is this: when others check the code out to another directory they will have to fix the path in this command. Is there a less hackish way of doing this?
Assuming d:\svn\some\directory is at a fixed location relative to your .sln file, you can use a relative path something like this:
xcopy /Y /R $(SolutionDir)..\directory\somedll.dll $(TargetDir)
(Note that the value of $(SolutionDir) includes a trailing backslash.)
If d:\svn\some\directory is within your solution folder then you can add somedll.dll to your Visual Studio solution and set "Copy to Output Directory" to "Copy always" in the file properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With