Visual Studio关于具有不同内容的文件副本的警告 [英] Visual Studio warning about copies of files with different contents

查看:210
本文介绍了Visual Studio关于具有不同内容的文件副本的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Visual Studio中调试我的C ++项目时,弹出一个警告对话框,告诉我:

When I go to debug my C++ project in Visual Studio, up pops a little warning dialogue box that tells me:

A copy of datum.h was found in
c:/users/brad/desktop/source/binary/datum.h, but the current
source code is different from the version built into
c:/users/brad/desktop/source/binary/datum.h.

我很难理解这甚至试图告诉我什么,更不用说如何解决它了.起初,我以为可能是在抱怨我不小心在目录中复制了一个文件(我检查了一下),却没有找到任何类似的东西,这让我很困惑.我还尝试从解决方案中排除文件,然后再次添加它,这也不能解决问题.

I'm having trouble understanding what this is even trying to tell me, let alone how to fix it. At first I thought it might be complaining that I'd accidentally duplicated a file in the directory, which I checked, and found nothing of the sort, which leaves me pretty stumped. I also tried excluding the file from the solution and adding it again, which didn't fix the problem either.

警告似乎并没有实际上阻碍我项目的发展,但是我认为警告的存在是有原因的,因此,如果有人知道出了什么问题,任何建议都将不胜感激.据我所知,我并没有进行任何更改以使该消息出现,只是我去调试该解决方案时弹出了消息,此后一直保持出现.

The warning doesn't appear to actually hinder the development of my project, but I suppose warnings exist for a reason, so if anyone knows what's gone wrong, any advice would be greatly appreciated. To my knowledge, I didn't change anything to cause the message to appear, it just popped up one time I went to debug the solution and has kept on appearing ever since.

此外,与我的解决方案中的其他头文件有关,同一警告的更多副本已开始弹出(我尚未收到有关.cpp文件的任何信息,但这可能是一个巧合,因为它一直在进行中.大约20分钟).

Also, more copies of the same warning have started popping up, pertaining to other header files in my solution (I haven't recieved any about .cpp files yet, but it could be a coincidence, because it's only been going on for about 20 minutes).

推荐答案

尝试从相关文件中删除断点. 当它与Visual Studio 2013一起出现在调试版本中的头文件中时,这对我有用.

Try removing breakpoints from the file in question. This worked for me when it occurred with Visual Studio 2013 for a header file in debug build. Source: Release mode file sync issue - current source code different from the version built

其他说明:清理/重建也可以,但是这对于定期更改代码很痛苦.启动调试器后启用断点只会延迟消息.

Additional notes: Clean / Rebuild also works, but that is painful for regularly changing code. Enabling the break point after starting debugger merely delays the message.

这篇关于Visual Studio关于具有不同内容的文件副本的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆