腊月的季节

visual studio遇到的问题

问题一

无法计算
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0@VCTargetsPath”处的属性表达式“\$([MSBuild]::ValueOrDefault(‘\$(VCTargetsPath)’,’\$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\’))”的值。静态方法调用语法“[MSBuild]::ValueOrDefault(‘\$(VCTargetsPath)’,’\$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\’)”无效
解决方案:
打开windows+R输入regedit,进入注册表找到:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions路径存在12.0的文件夹则删除掉即可,
删除后应该如下图:
正在加载图片

问题二

error MSB8020: The builds tools for v120 (Platform Toolset = ‘v120’) cannot be found. To build using the v120 build tools, either click the Project menu or right-click the solution, and then select “Update VC++ Projects…”​
解决方案:
1.在所在的项目工程下单击右键:
图片正在加载中
2.属性–>配置属性–>常规–>平台工具集–>Visual Studio 2012(v110)即可
图片正在加载中

问题三

error : Required file tracker.exe is missing
其实就是找到你的项目文件xxxx.vcxproj,使用编辑器打开,是xml格式的定义文件,查找关键字PropertyGroup
会发现有几个这样的配置,然后在这样的关键附近插入如下代码:

1
2
3
4
<!-- for example in the project file -->
<PropertyGroup>
<TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>

加入后,我的项目文件的代码定义像下面这个样子:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</ItemGroup>
<PropertyGroup>
<TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{325EC88B-5F85-493D-92C0-E5CEBCA0BB39}</ProjectGuid>
<RootNamespace>MFCQQChat</RootNamespace>
<Keyword>MFCProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Static</UseOfMfc>
</PropertyGroup>

热评文章