Nuget package added postbuild event:
if not exist "$(TargetDir)x86" md "$(TargetDir)x86"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"
if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64"
xcopy /s /y "$(SolutionDir)packages\SqlServerCompact.4.0.8482.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64"
and it works when i just compile.
When i want to publish – these directories(x86, amd64) do not appear in Application Files. I dont want to copy existing files, because nuget package will be updated and existing copies will change, so that i will have to remember that i need to re-add them. How to deploy these exact directories(embedded sqlce needs exactly such structure) with files via clickonce and make that process not dependent on package version?
Found answer here:
https://stackoverflow.com/a/2514027/47672
In my case the code was: