All this error is saying is that you're missing a directory. Since the error occurs twice, you're missing two directories.
These are the directories:
'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\lib\x64'
'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\lib\x64'
The error also says that the existence of these directories is checked because they're specified in 'LIB environment variable'
.
To quote Microsoft, "Environment variables store data that's used by the operating system and other programs. For example, the WINDIR environment variable contains the location of the Windows installation directory. Programs can query the value of this variable to determine where Windows operating system files are located."
In this case, the LIB environment variable stores directories to check for libraries when building applications. When building your application, MSBuild passes the directories in LIB to the C# compiler (CSC), and CSC checking each one for libraries to use. Two of those directories, it turns out, don't exist on your particular computer, so CSC shows this error.
To fix this problem, you can just remove the directories from your LIB environment variable.
To do this, open the environment variable editor. You can do this by either searching for 'system env' in your Windows 10 start menu, selecting the "Edit the system environment variables" result and then clicking the "Environment Variables" button at the bottom of the window that appears, or by running the following in an Administrator command prompt:
rundll32 sysdm.cpl,EditEnvironmentVariables
In the window that appears you'll see two sections. The top section is labelled User variables for <your username>
and the bottom section is labelled System variables. Look through each section for a LIB environment variable. Open each LIB environment variable for editing by clicking it and then clicking the 'Edit...' button associated with that section. Each time you'll be presented a list of directories. Find the directory entries that are showing up in your build errors and delete them. If you have two LIB variables, both directories will probably only be in one of the two.
You might be wondering why this issue appeared in the first place. It's possible that you deleted these directories when you modified your Visual Studio 2019 installation, but for whatever reason, the Visual Studio installer didn't clean up the LIB environment variable. Perhaps because you modified it in the past. Perhaps because the installer just missed it.