vb.net 源文件与构建模块时不同?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23880141/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The source file is different from when the module was built?
提问by Nerdsworth
Mediocre VB.Net student here, but not a total noob. I've been getting this error: "The source file is different from when the module was built. Would you like the debugger to use it anyway?"
平庸的 VB.Net 学生在这里,但不是一个完全的菜鸟。我一直收到此错误:“源文件与构建模块时不同。您是否仍希望调试器使用它?”
I chose Form1.vb on the "Find Source: Form1.vb" open file dialog box that followed. After that, my program has been acting very weirdly. For example, I have codes inside the sub that handles Button1 click, and then I moved those codes somewhere. Now when debugging, when I click that button, it executes the codes that I just removed a minute ago!
我在随后出现的“查找源:Form1.vb”打开文件对话框中选择了 Form1.vb。在那之后,我的程序一直表现得很奇怪。例如,我在处理 Button1 单击的 sub 中有代码,然后我将这些代码移到某处。现在在调试时,当我单击该按钮时,它会执行我一分钟前刚刚删除的代码!
I'm scared because I don't to waste the 2 months of hard work that I've already spent on this project. Too friggin stupid to remember to backup the whole thing. Stackoverflow, please don't fail me now.
我很害怕,因为我不想浪费我已经在这个项目上花费的 2 个月的辛勤工作。太该死的愚蠢以至于不记得备份整个事情。Stackoverflow,现在请不要让我失望。
回答by Tithi Patel
As you have explained i think the scenario is your modified code is not build correctly.. once rebuild the entire solution.
正如您所解释的,我认为这种情况是您修改后的代码没有正确构建......一旦重建整个解决方案。
Please be sure work in debug mode, and then try Clean solution and then "Rebuild All".
请确保在调试模式下工作,然后尝试清理解决方案,然后“全部重建”。
refer following links may also help you..
参考以下链接也可以帮助你..
the source file is different from when the module was built
Warning given when debugging source code in visual studio 2010

