2

I need to get the respective SQLite x86/x64 dlls into the bin folder according to if I build to x86, x64 or Any CPU. Where/how would I specify this in an easy manner? Assume I have the dlls in /x86/ and /x64/ folders.

I try this in the proj file, but has no effect. The command works when put in build events through Properties tab (without condition), but not when I edit the xml file:

  <PropertyGroup>
    <PostBuildEvent Condition ="'$(Configuration)|$(Platform)' == 'Release|x86' ">
       copy "$(ProjectDir)x86\*.*" "$(TargetDir)"
    </PostBuildEvent>
  </PropertyGroup>

edit:

So this is how to put conditions in the Build Events 'window':

If $(PlatformName) == x86 copy "$(ProjectDir)Libs\x86\System.Data.SQLite.dll" "$(TargetDir)System.Data.SQLite.dll"

Still not sure why it doesn't work from the proj file though.

bretddog
  • 5,411
  • 11
  • 63
  • 111

1 Answers1

0

Try writing your own bat|cmd file, you may pass arguments required for performing some actions to it and then it will work with the postbuild event string like:

call "mybatfile.bat" "arguments"

Eugene Cheverda
  • 8,760
  • 2
  • 33
  • 18