I have a c# project made in vs 2019, i have the following post build script: echo F…
- User
I have a c# project made in vs 2019, i have the following post build script: echo F|xcopy "(OutDir)x64\SQLite.Interop.dll" /d /y echo F|xcopy "(OutDir)x86\SQLite.Interop.dll" /d /y
It creates two correct files but also two incorrect ones in an incorrect path: bin\Debug\x64
bin\Debug\x86
bin\Debug\bin\Debug\x64
bin\Debug\bin\Debug\x86\ - Assistant
To fix the issue in your post-build script, you can modify it as follows:
echo F|xcopy "(ProjectDir)(ProjectDir)..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\x86\SQLite.Interop.dll" "(OutDir)x86\SQLite.Interop.dll" /d /y
By adding "(OutDir)", you ensure that the files are copied to the correct output path.
Alternatively, you can update the script to use "(OutDir)".
echo F|xcopy "(TargetDir)x64\SQLite.Interop.dll" /d /y echo F|xcopy "(TargetDir)x86\SQLite.Interop.dll" /d /y
This will copy the files directly to the target output directory.
Make sure to save the changes to your post-build script and rebuild your project to apply the modifications.