The reason for this error is that AppGameKit uses XAudio 2.7 which is a version behind what shipped with Windows 8+. This is to provide compatibility with Windows XP.
To ensure the user can use your AppGameKit application without the error, you will have to bundle the needed DirectX files and have them silently install via an installer. AGK's own installer does not do this, or at least it didn't last time I checked, and you would still need to do it yourself for standalone executables.
Here is my own NSIS script included in my AppGameKit installers for such a purpose. It is minimal and only includes the required files so is about 2MB overhead.
; Install DirectX Files for AGK Compatibility
Section "-InstallMinimalDirectX"
SetOutPath "$TEMP"
File "D:\DirectX\Jun2010_XAudio_x86.cab"
File "D:\DirectX\DSETUP.dll"
File "D:\DirectX\dsetup32.dll"
File "D:\DirectX\DXSETUP.exe"
File "D:\DirectX\dxupdate.cab"
ExecWait "$TEMP\DXSETUP.exe /silent" $0
Delete "$TEMP\Jun2010_XAudio_x86.cab"
Delete "$TEMP\DSETUP.dll"
Delete "$TEMP\dsetup32.dll"
Delete "$TEMP\DXSETUP.exe"
Delete "$TEMP\dxupdate.cab"
${if} $0 != "0"
MessageBox MB_ICONEXCLAMATION "DirectX may not be properly installed on your system. If you experience problems running this application, please download and install the DirectX runtime files from http://www.microsoft.com/en-us/download/details.aspx?id=8109"
${endif}
SectionEnd
The DirectX directory files referenced were pulled from the DirectX SDK you will need to download.