metacircle
metacircle

Reputation: 2578

Release Build does not build current source

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?!

Upvotes: 1

Views: 119

Answers (2)

Trevor Pilley
Trevor Pilley

Reputation: 16393

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

Upvotes: 1

dutzu
dutzu

Reputation: 3910

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

Upvotes: 2

Related Questions