Hosted VS2017 agent build master.dacpac does not exist - visual-studio-2017

My solution created with VS2017 Professional contains an SQL Server Database Project that references the master database. When using the Hosted VS2017 agent to build my solution in Visual Studio Team Services I'm getting the errors below:
2017-07-14T12:44:17.8387743Z ##[error]C:\Program Files (x86)\Microsoft
Visual
Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(559,5):
Error SQL72027: File "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\110\SqlSchemas\master.dacpac"
does not exist. 2017-07-14T12:44:17.8397816Z C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(559,5):
Build error SQL72027: File "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\110\SqlSchemas\master.dacpac"
does not exist.
[d:\a\3\s\Main\ItAsset.Database\ItAsset.Database.sqlproj]
How can I fix this and get my solution to build in VSTS?

I just got bit by this in a multi-developer situation. It seems to happen in VS2017 SSDT projects where the developer who checked in the code originally had their installation of Visual Studio in a different path than you, or another instance of Visual Studio. For example if developer A installed to defaults on C:\ but developer B installed his VS2017 to E:\ drive, whoever creates the reference to Master will work, the other will not find the dacpac file.
Looking in the .sqlproj file, you'll likely find this reference to the Master database:
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac">
<HintPath>$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac</HintPath>
Note: the <HintPath> is correct, but the Include=" is a hard coded path. It seems that the hint path is not followed as it normally should be. To fix your problem, try copying the contents of the HintPath element to the Include attribute. Leave the HintPath as it is.
<ArtifactReference Include="$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac">

This is a bug in SSDT for Visual Studio 2017.
The workaround is to manually edit the project file(s) replacing the full path with the $(DacPacRootPath) variable. Or, you can use SSDT for Visual Studio 2015.
https://feedback.azure.com/forums/908035-sql-server/suggestions/32897047-visual-studio-2017-ssdt-adds-hardcoded-master-dacp#comments
8/12/2019 Update - This bug has been fixed in Visual Studio 2019 and Visual Studio 2017 version 15.9.13. See here - https://developercommunity.visualstudio.com/content/problem/124214/visual-studio-2017-ssdt-adds-hardcoded-mmsdb-andor.html

It uses the absolute path that isn’t existing in Hosted VS2017 agent. (Professional vs Enterprise). You can check project file (open sqlproj file via nodepad)
You can copy master.dacpac to your project folder and include it to project, then add the reference to this file.

We had development machines with different versions of Visual Studio. I used a condition to specify the HintPath
<Choose>
<When Condition="Exists('C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac')">
<ItemGroup>
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac</HintPath>
<SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
<DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
</ArtifactReference>
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\msdb.dacpac">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\msdb.dacpac</HintPath>
<SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
<DatabaseVariableLiteralValue>msdb</DatabaseVariableLiteralValue>
</ArtifactReference>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac</HintPath>
<SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
<DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
</ArtifactReference>
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\msdb.dacpac">
<HintPath>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\msdb.dacpac</HintPath>
<SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
<DatabaseVariableLiteralValue>msdb</DatabaseVariableLiteralValue>
</ArtifactReference>
</ItemGroup>
</Otherwise>
</Choose>

Trying to open an SSDT in VS2019 that was created in VS2017, requires change
From:
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac">
To:
<ArtifactReference Include="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SQLSchemas\master.dacpac">
NOTE: Enterprise Visual Studio

Related

The path to save the template SSRS Visual Studio 2019

The following path for SSRS templates doesn't work in Visual Studio 2019.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
Initially the path was not there so I created one hoping I'll be able to see templates, but it didn't work out. I looked up this issue and someone suggested the following path instead:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\2019\SQL\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject
Still I'm not able to see the SSRS template created.
What's the right location for the templates?
Thank you !
This works for me:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject

Visual Studio 2019: build C++ from command line with vcvars64.bat doesn't work anymore

In order to compile an app with cl cpp compiler in the command line on previous versions of Visual studio I ran the vcvars64.bat script and then compiler worked as expected.
I have recently installed Visual Studio 2019. I have found vcvar64.bat script at the following location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build.
But running this script doesn't make cl compiler work. Even simple 3 line cpp files fail compilation with silly errors like "stddef.h" file not found. Compiler works as expected if you are using it from IDE.
What do you need to do to make VS2019 cpp compiler work in command line?
In my visual studio 2019 installation stddef.h is found in C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt. vcvars.bat should be adding this path to the INCLUDE environment variable.
Running the following might provide some hints:
set VSCMD_DEBUG=3
vcvars64.bat > out.txt
In my installation searching out.txt for call :GetWin10SdkDir comes to the section where the bat file is searching for a SDK directory. Hopefully there will be some error messages in there somewhere.
For reference these are the additional environment variables set by a working call to vcvars64.bat on my machine:
CommandPromptType=Native
DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\
ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
Framework40Version=v4.0
FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework64\
FrameworkDIR64=C:\WINDOWS\Microsoft.NET\Framework64
FrameworkVersion=v4.0.30319
FrameworkVersion64=v4.0.30319
HTMLHelpDir=C:\Program Files (x86)\HTML Help Workshop
INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt
LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64;
LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\ATLMFC\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\
Path=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\VS15Preview\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\VS15Preview\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\\MSBuild\Current\Bin;C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\;
Platform=x64
UCRTVersion=10.0.17763.0
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\VC\
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\
VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\
VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Redist\MSVC\14.24.28127\
VCToolsVersion=14.24.28314
VisualStudioVersion=16.0
VS160COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x64
VSCMD_ARG_TGT_ARCH=x64
VSCMD_VER=16.4.2
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\
WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0
WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
WindowsSDKLibVersion=10.0.17763.0\
WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\
WindowsSDKVersion=10.0.17763.0\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\
__DOTNET_ADD_64BIT=1
__DOTNET_PREFERRED_BITNESS=64
If all else fails a re-install of visual studio is likely to fix the issue.
First of all ,you should install either Visual Studio and the optional Desktop development with C++ workload, or the command-line Build Tools for Visual Studio.
Before you can build a C or C++ program on the command line, you must
verify that the tools are installed, and that you can access them from
the command line. Visual C++ has complex requirements for the
command-line environment to find the tools, headers, and libraries it
uses. You can't use Visual C++ in a plain command prompt window
without doing some preparation. Fortunately, Visual C++ installs
shortcuts for you to launch a developer command prompt that has the
environment set up for command line builds. Unfortunately, the names
of the developer command prompt shortcuts and where they're located
are different in almost every version of Visual C++ and on different
versions of Windows.
A developer command prompt shortcut automatically sets the correct
paths for the compiler and tools, and for any required headers and
libraries. You must set these environment values yourself if you use a
regular Command Prompt window.
If you get an error such as "'cl' is not recognized as an internal or external command, operable program or batch file," error C1034, or error LNK1104 when you run the cl command, then either you are not using a developer command prompt, or something is wrong with your installation of Visual C++.
I suggest you could try to use Developer Command Prompt for VS directly. Please open the Start menu and choose All apps. Scroll down and open the Visual Studio folder (not the Visual Studio application). Choose Developer Command Prompt for VS to open the command prompt window.
For more details I suggest you could refer to the DOC:Walkthrough: Compiling a Native C++ Program on the Command Line

Visual Studio 2017 failed to locate cl.exe

I recently installed Visual Studio 2017 and need to change something in a C++ project.
But when I try to build, it says cl.exe is missing. None of the solutions provided online seem to work.
I do have a cl.exe, but it is located under this path:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64
I have also tried running vcvars32.bat, but that does not seem to make any changes.
And I have installed 'Desktop development with C++'.
I solved it by running vcvars.bat.
For Visual Studio Enterprise 2017 it is located under the following directory:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\vsdevcmd\ext

'cl' is not recognized as an internal or external, vcvarsall

I've been trying to install Boost Libraries for 5 months now, yes very embarrassing, and currently this is the error I run into.
I am running this on Windows 7, 64 bit. Boost 1_59_0.
I used the Visual Studio 2013 x64 Native prompt to go to the boost directory and ran
bootstrap.bat
and then
b2 --toolset=msvc --build-type=complete architecture=x86 address-model=64 stage
However I get the error
'cl' is not recognized as an internal or external command
Following this, I ran
vsvarsall amd64
from
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
I went back and tried running b2 again but I got the same error as before.
I searched for "cl.exe" on my laptop and I found it here:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_arm
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_arm
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin
I understand that 'b2' is unable to find 'cl' and I have to give the 'path' to the 'cl.exe' but I don't know how to set path, what to type where etc. I thought that 'vsvarsall' was supposed to fix this but it didn't.
Please help.
EDIT 1:
I set path following the instructions given in the comments, but I am still getting the same errors.
In your log, you have a number of calls to "C:\Users....\b2_msvc_12.0_vcvarsall_amd64.cmd". This is a file that caches the environment that VC needs. Could you try deleting it, in case it got stale value from older version?
You need to make sure that you run vsvarsall.bat and in the same cmd window run bootstrap and b2. Since the env variables are only set for that shell. Otherwise add the paths set by vsvarsall.bat manually in environment variables for the system.
You can search your control panel to find where to set environment variables, or hit the windows key and type in environment variables. You will get a shortcut to the window for those settings.

C++ #include <atlbase.h> is not found

When I compile my C++ program in Visual Studio Express it says that it can't find atlbase.h. Am I missing some SDK or something?
Visual Studio 2017
When running the Visual Studio Installer, select the Individual components tab, and under SDKs, libraries, and frameworks make sure Visual C++ ATL Support is selected.
It is included with the Windows Driver Kit Version 7.1.0.
Microsoft ATL (Active Template Library), which includes the header atlbase.h is included with the Windows 2003 SDK, but it is not included with any newer Windows SDK release. It is also included with Professional editions of Visual Studio.
Solution for Visual Studio 2017 Express edition
I had the same error when building a COM C++ project in Visual Studio 2017 Express edition. As mentioned by several users here, ATL support is not included with the Express edition of Visual Studio. So to build a C++ COM/ATL project you need at least the Community edition.
If you really need to use the Express edition, you can download and install the Build Tools for Visual Studio 2017. Make sure to enable the 'Visual C++ ATL for x86 and x64' component during the setup.
After that add additional VC++ directories in the project properties:
Include directories: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\atlmfc\include
Library directories: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\atlmfc\lib\x86
The VC++ compiler should now be able to find the ATL source and library files.
For users of Visual Studio 2015, ensure Common Tools for C++ is installed (part of the VS installer).
Situation
With Visual Studio 2017 Community Edition, we installed "Visual C++ ATL support" and MFC and ATL support. The error still occurred in our x64 project.
Solution
We fixed some paths with the following two commands:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>mklink /d atlmfc "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc"
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc\lib>mklink /d amd64 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc\lib\x64
Details
We eventually found the header atlbase.h in C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc\include. This path simply was not added to the VC Include directory by vsvars32.bat, so the header was not found during build.
vsvars32.bat includes the following line:
#if exist "%VCINSTALLDIR%ATLMFC\INCLUDE" set INCLUDE=%VCINSTALLDIR%ATLMFC\INCLUDE;%INCLUDE%`.
This resolved to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include in our machine.
We created a directory junction, so the build tool finds atlbase.h in the expected directory (this is the first command from the Solution section above):
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>mklink /d atlmfc "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc"
Afterwards, the linker did not find atls.lib (see Cannot Open File atls.lib). This was due to the expected file structure was that lib should directly contain the x86 version of the libs and lib\amd64 should contain the x64 variants. Instead, lib\x86 contained the x86 versions and lib\x64 contained the 64 bit versions. Since we build a 64 bit project, creating another directory junk from amd64 to x64 solved the problem:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc\lib>mklink /d amd64 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\atlmfc\lib\x64
That header appears to be a part of the Windows Platform SDK.
You should search your computer for the file. That will tell you if you're missing it.
I had same problem with sample project. I specified the sample project's properties and the sample project compiled successfully.
Visual Studio 8
For header
C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include
For .lib file
C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\lib
I have not yet seen anyone mention Visual Studio 2015 (MSBuild 14.0). In this case I've had to download Visual C++ BuildTools (found here: https://visualstudio.microsoft.com/vs/older-downloads/). After having installed this, running the installer again allowed me to modify the installation and include the ATL libs.
Hope this helps anyone that is still using MSBuild 14.0