Release Build does not build current source

让人想犯罪 __ 提交于 2019-12-24 12:44:04

问题


I built the latest version using the Release build profile of VS2012 for presenting my application this morning. It didn't work as expected.

I presented a faulty application even though it worked fine this morning. After a few tests, I discovered that the Release build configuration caused the issue. I cleaned my project a few times with no change. I have this Button Event Handler in my code:

private void btnAddDatabaseValues_Click(object sender, RoutedEventArgs e)
{
    MessageBox.Show("test");

    /*
    some other Code...
    */

}

In Debug mode, the message box pops up. In release mode, some other code is executing, and no message box pops up.

Any ideas?

I recently moved from VS2010 to VS2012 and installed Resharper. But I don't think this has anything to do with my problem since in Debug Mode all is fine?!


回答1:


Clean the solution and rebuild. The build is optimized to not run for projects that have already been built and sometimes this backfires.




回答2:


Check that the project is being build against the correct configuration, I've encountered a problem before where the solution was set to Debug and 1 of the projects had been changed to Release



来源:https://stackoverflow.com/questions/14461420/release-build-does-not-build-current-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!