VS2022 vs ptrust.cpp
While attempting a C++ compile in VS2022 the following error is raised: LNK1104 cannot open file 'msvcurt.lib'
A search for this file in the VS2022 file structure results in 'file not found'.
Searching by file contents results in this file being identified: ptrust.cpp (found in folder C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34604\crt\src\vcruntime )
ptrust.cpp contains these lines:
#define _PARTIAL_TRUST_OBJ
#include "mstartup.cpp"
#if defined (_M_CEE_MIXED)
#ifdef _DEBUG
#pragma comment(linker, "/nodefaultlib:msvcmrtd.lib")
#pragma comment(lib, "msvcrtd.lib")
#else /* _DEBUG */
#pragma comment(linker, "/nodefaultlib:msvcmrt.lib")
#pragma comment(lib, "msvcrt.lib")
#endif /* _DEBUG */
#else /* defined (_M_CEE_MIXED) */
#ifdef _DEBUG
#pragma comment(linker, "/nodefaultlib:msvcurtd.lib")
#pragma comment(lib, "msvcrtd.lib")
#else /* _DEBUG */
#pragma comment(linker, "/nodefaultlib:msvcurt.lib")
#pragma comment(lib, "msvcrt.lib")
#endif /* _DEBUG */
#endif /* defined (_M_CEE_MIXED) */
What is of concern is that references to msvcurt.lib and msvcurtd.lib are included in this version of VS2022 when they're not included in this install and have been deprecated since 2023 - as per: https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170
Why are references to these deprecated libraries still included in the latest VS2022 install?
How does one resolve this error?