I've got a .NET solution which relies upon a third party API. The API appears to mostly be an interface which depends on other files (sqlite, dlls, license, etc.). The third party classes are used throughout a number of my projects, and seemingly have to sit in the same location as my final executable.
The third party directory looks roughly like this:
RootDirectory
     File1.dll
     File2.dll
     Subdirectory
          FileA
          Subsubdirectory
               FileB
               FileC
               etc.
On build, the application has to look like this, or else the API doesn't work:
MyApp.exe
ThirdPartyAPI.dll
File1.dll
File2.dll
Subdirectory
     FileA
     Subsubdirectory
          FileB
          FileC
          etc.
I'd like to keep the dependent file structure intact in a location called [SolutionDir]\RootDirectory, and have them simply copy over to my build as needed. The problem I seem to be having is I can't copy files from RootDirectory when I compile. If I try to delete my bin, it says that File1 and File2 are in use, so I'm assuming that's the hold up.
I tried using this post build event: xcopy "$(SolutionDir)RootDirectory\" "$(TargetDir)" /s /e /h It works sometimes, fails with a Code 2 other times...and haven't figured out why yet.
Any thoughts or other ideas?
 
    