I have a Direct3D Application.
We use the NuGet Package directxtk_desktop_2015.
In recent packages like directxtk_desktop_win10 or directxtk_uwp, I have additional WICTextureLoader flags which I want and need.
However, when I add these packages to NuGet, I receive the linker error
LINK : fatal error LNK1104: cannot open file 'DirectXTKAudioWin8.lib'
How can I resolve this? This is my current packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="directxtk_desktop_win10" version="2020.8.15.1" targetFramework="native" />
</packages>
You should use only one of those packages at a time. If you are currently using
directxtk_desktop_2015and you are using VS 2019, then you should usedirectxtk_desktop_2017instead.The
directxtk_desktop_2015package only included the Windows 8+ version of DirectX Tool Kit for Audio, but withdirectxtk_desktop_2017I switched to using the XAudio2Redist which supports Windows 7 SP1 or later. If you only require Windows 10 or later support, then usedirectxtk_desktop_win10instead. For UWP apps (i.e. not Win32 desktop apps), you'd usedirectxtk_uwp.See the wiki for more details.
UPDATE: In this case, the problem was
.vcxprojwas not fully cleaned up to remove the references todirectxtk_desktop_2015. Opening thevcxprojin a text editor and verifying whichtargetsare being referenced found this issue.