调试报The source file is different from when the module was built error解决办法

来源:互联网 发布:有关网络直播的论文 编辑:程序博客网 时间:2024/05/17 03:41

调试报The source file is different from when the module was built error解决办法!

之前有个项目,一个Solution里面有几个consoleapp,一个website,调试没发现有任何错误,但是今天建立一个新的项目,类似之前的,发现每次改完代码,DLL引用的地址并非我references的地址,Google一下,老外给了各种建议:


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:

I had checked "Only build startup projects and dependencies on Run" (Tools -> Options -> Projects and Solutions -> Build and Run)
In Configuration Manager, my start-up project didn't have "Build" checked


https://stackoverflow.com/questions/3087390/the-source-file-is-different-from-when-the-module-was-built


然而我按照他的步骤,却还是报module was built error!


当然准备crazy的时候,发现在每个项目右键中有个“build dependencies”里面有“project dependencies”引用需要的consoleapp就解决问题了。



阅读全文
0 0
原创粉丝点击