Fly With My Heart

誓言无声,人生无悔。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  54 随笔 :: 2 文章 :: 6 评论 :: 0 引用

公告

Fortunately, the fix I did for this is pretty straight-forward as it requires few hand-edit changes in the C++ targets. Here are the steps to make this problem go away:

1) go to <Program Files>\MSBuild\Microsoft.Cpp\v4.0\ and open Microsoft.CppBuild.targets
2) before editing this file, please make a backup
3) find the target named DoLibOutputFilesMatch and inside the target replace:

<VCMessage Condition="'%(_OutputFileFromLib.FullPath)' != '$(TargetPath)'" Code="MSB8012" Type="Warning" Arguments="TargetPath;$(TargetPath);Library;%(_OutputFileFromLib.FullPath);Lib"/>

with

<VCMessage Condition="'%(_OutputFileFromLib.FullPath)' != '$([System.IO.Path]::GetFullPath($(TargetPath)))'" Code="MSB8012" Type="Warning" Arguments="TargetPath;$(TargetPath);Library;%(_OutputFileFromLib.FullPath);Lib"/>

4. find the target named DoLinkOutputFilesMatch and inside this target replace:

<VCMessage Condition="'%(_OutputFileFromLink.FullPath)' != '$(TargetPath)'" Code="MSB8012" Type="Warning" Arguments="TargetPath;$(TargetPath);Linker;%(_OutputFileFromLink.FullPath);Link"/>

with

<VCMessage Condition="'%(_OutputFileFromLink.FullPath)' != '$([System.IO.Path]::GetFullPath($(TargetPath)))'" Code="MSB8012" Type="Warning" Arguments="TargetPath;$(TargetPath);Linker;%(_OutputFileFromLink.FullPath);Link"/>

4. Save the file and restart any instance of VS you may have opened

posted on 2010-06-04 16:43 FlyWithMyHeart 阅读(...) 评论(...) 编辑 收藏