问题
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