Visual Studio 2017更改%(AdditionalIncludeDirectories)

时间:2018-03-15 11:23:07

标签: visual-studio-2017 visual-leak-detector

https://kinddragon.github.io/vld/安装和卸载 Visual Leak Detector 后,它在默认的VS2017设置中留下了很多Include / Lib目录。

这对项目没有任何问题,但我只想知道,如何将其更改为默认值? Google仅针对较旧的Visual Studio提供了答案。

以下是截图:

Property page

Include directories macros

1 个答案:

答案 0 :(得分:1)

Where does Visual Studio 2017 store its config?

在本主题(上面的链接)中,VS2017现在将其设置保存在单独的文件中。

但是它还将%AdditionalIncludeDirectories和%AdditionalLibraryDirectories保存在单独的文件夹c:\ Users \ YourName \ AppData \ Local \ Microsoft \ MSBuild \ v4.0 \

以下是 Microsoft.Cpp.Win32.user.props 的样子:

    <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ImportGroup Label="PropertySheets">
    </ImportGroup>
    <PropertyGroup Label="UserMacros"/>
    <PropertyGroup/>
    <ItemDefinitionGroup><ClCompile><AdditionalIncludeDirectories>C:\Program Files (x86)\Visual Leak Detector\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories></ClCompile><Link><AdditionalLibraryDirectories>C:\Program Files (x86)\Visual Leak Detector\lib\Win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories></Link><Lib><AdditionalLibraryDirectories>C:\Program Files (x86)\Visual Leak Detector\lib\Win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories></Lib></ItemDefinitionGroup>
    <ItemGroup/>
</Project>

Microsoft.Cpp.x64.user.props

也一样

因此,根据需要更改设置,这将更改VS2017中的设置(我刚刚删除了文件夹)。