That isn't a valid macro so you cannot use it in command. In the project properties where you generally add the post-build event there is an option to see the allowed macros. You are limited to them or env variables that may be defined at the point the post-build event runs.
It is unclear to me what your pkgname
variable is supposed to represent. In general I recommend that if you have binaries that your app depends on then place them into some sort of "Dependencies" folder as part of the project. Then your post-build event can copy all the files from the "Dependencies" to the target directory.
xcopy /q /y "$(ProjectDir)dependencies\*.*" "$(TargetDir)"
If you need to use mutiple macros then join them.
xcopy /q /y "$(ProjectDir)dependencies\$(ConfigurationName)*.*" "$(TargetDir)"
Note that directory macros already have the ending slash so you don't need to include them. Refer to the master list of available macros here.