源文件是从模块建造时不同 [英] the source file is different from when the module was built

查看:134
本文介绍了源文件是从模块建造时不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是推动我疯了。

我有我试图修改一个相当大的工程。我在前面,当我输入的DbCommand 时,Visual Studio没有做任何语法高亮它注意到了,我使用的使用 System.Data.Common

I have a rather large project that I am trying to modify. I noticed earlier that when I typed DbCommand, visual studio did not do any syntax highlighting on it, and I am using using System.Data.Common.

虽然没有强调,该项目似乎我的浏览器中运行良好。所以我决定运行调试器,看看如果事情真的工作,因为他们应该的。

Even though nothing was highlighted, the project seemed to be running fine in my browser. So I decided to run the debugger to see if things were really working as they should be.

每一次没做高亮类称为我得到的源文件是从模块生成时不同的消息。

Every time the class that didn't do the highlighting is called I get the "the source file is different from when the module was built" message.

我打扫的解决方案,并重建了好几次,删除tmp文件的,在这里照着所有的方向<一个href=\"http://stackoverflow.com/questions/353421/getting-the-source-file-is-different-from-when-the-module-was-built\">Getting &QUOT;源文件是指从模块建造不同的&QUOT; ,重新启动Web服务器和它仍然告诉我的源文件都不同的,当他们显然不是。

I cleaned the solution and rebuilt it several times, deleted tmp files, followed all the directions here Getting "The source file is different from when the module was built.", restarted the web server and still it tells me the source files are different when they clearly are not.

我无法测试任何code我今天写,因为这一点。

I cannot test any of the code I have written today because of this.


  • 怎么能源比二进制不同,当我刚遵守
    它?

  • 有什么办法敲某种意义上到Visual Studio,还是我
    我只是失去了一些东西?

推荐答案

我运行一个控制台应用程序这个问题在哪里,这是不同的来源是有入口点源(静态无效的主要)。删除bin和OBJ目录,并做了充分的重建似乎解决这​​个问题,但每次我做了一个code修改的时候,它会超出日期又来了。

I got this issue running a console app where the source that was different was the source that had the entry-point (static void Main). Deleting the bin and obj directories and doing a full rebuild seemed to correct this, but every time I made a code change, it would go out-of-date again.

我发现这种情况的原因是:

The reason I found for this was:


  1. 我测试过只有建立在运行启动项目和相关性(工具 - >选项 - >项目和解决方案 - >生成和运行)

  2. 在配置管理器,我的初创项目没有生成检查

(#2 - >通过访问下的调试/发布下拉列表中选择工具栏)

(For #2 -> accessible via the toolbar under the 'Debug/Release' drop down list.)

这篇关于源文件是从模块建造时不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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