vs2013 warning MSB8012 的问题解决
来源:互联网 发布:淘宝猜你喜欢怎么设置 编辑:程序博客网 时间:2024/06/11 21:14
警告提示信息为
warning MSB8012: TargetPath(D:\work\code\xxxx\Debug\xxxx.exe) does not match the Linker's OutputFile property value (c:\ccc\xxxx.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
这个问题通常是由于项目的设置引起的
修改 项目属性->常规->输出目录 与 链接器->常规->输出文件 保持一致即可。
重点来了,场景二,如果你要编译生成到指定目录然后(配置输出目录),启动调试,在(DEBUG下)也出现这个警告是因为什么呢?
经本人测试,应该算是vs2013的bug!
在debug中修改了输出目录后,VS2013IDE会去修改 项目.vcxproj 文件,增加输出目录的个性化配置,但是这段配置代码加在了vcxproj文件中的靠末尾部分,程序在编译时并未读取到这个配置信息,解决办法是把这段代码手动的插入到更靠前的部分去,本人将它提到
便成
以下是关键配置代码
这个问题通常是由于项目的设置引起的
修改 项目属性->常规->输出目录 与 链接器->常规->输出文件 保持一致即可。
重点来了,场景二,如果你要编译生成到指定目录然后(配置输出目录),启动调试,在(DEBUG下)也出现这个警告是因为什么呢?
经本人测试,应该算是vs2013的bug!
在debug中修改了输出目录后,VS2013IDE会去修改 项目.vcxproj 文件,增加输出目录的个性化配置,但是这段配置代码加在了vcxproj文件中的靠末尾部分,程序在编译时并未读取到这个配置信息,解决办法是把这段代码手动的插入到更靠前的部分去,本人将它提到
1 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
2 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
3 </ImportGroup>
之后,2 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
3 </ImportGroup>
便成
1 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
2 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
3 </ImportGroup>
4 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
5 <LinkIncremental>true</LinkIncremental>
6 <OutDir>c:\ccc\</OutDir>
7 </PropertyGroup>
8 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
9 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
10 </ImportGroup>
再编译就不会出现警告了。2 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
3 </ImportGroup>
4 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
5 <LinkIncremental>true</LinkIncremental>
6 <OutDir>c:\ccc\</OutDir>
7 </PropertyGroup>
8 <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
9 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
10 </ImportGroup>
以下是关键配置代码
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>c:\ccc\</OutDir>
</PropertyGroup>
<LinkIncremental>true</LinkIncremental>
<OutDir>c:\ccc\</OutDir>
</PropertyGroup>
0 0
- vs2013 warning MSB8012 的问题解决
- vs2013 warning MSB8012解决方案
- warning MSB8012
- 【问题解决】warning MSB8012:TargetPath与Linker的OutputFile属性值不匹配
- vs2012工程的warning MSB8012解决办法
- VS编译时MSB8012 的问题解决
- VS2010 Warning:MSB8012
- 解决warning MSB8012:问题
- warning MSB8012 VS2010
- error C1189以及warning MSB8012
- vs下warning MSB8012解决方案
- VS中warning MSB8012:TargetPath与 Linker 的 OutputFile 属性值不匹配
- vs2010中的MSBuild输出warning MSB8012问题
- vs2010中的MSBuild输出warning MSB8012问题
- vs2010中的MSBuild输出warning MSB8012问题
- vs2010中的MSBuild输出warning MSB8012问题
- vs2010中的MSBuild输出warning MSB8012问题
- (记录)vs2010中的MSBuild输出warning MSB8012问题
- 关于 JSP Servlet 乱码的一点记录
- Ubuntu UFW 防火墙
- Java中常用的锁分析总结
- java中对cookie的读写操作
- Django 中自定义 tag 如何获取变量参数的值
- vs2013 warning MSB8012 的问题解决
- leetcode19. Remove Nth Node From End of List
- Java中父类强制转换成子类的原则
- jquery 给table里的td动态创建控件并处理
- 通讯协议序列化
- NSString / NSMutableString 字符串处理,常用代码 (实例)
- 利用DLL注射技术实现进程内容修改
- Poj 1472 Instant Complexity
- redis快照文件dump.rdb解析工具--redis-rdb-tools