Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 doesn't apply changes unless I clean / rebuild the solution first

I've stumbled upon a really annoying issue with Visual Studio 2012. Scenario: I am developing a Windows Phone 8 App, in C#, with Telerik RedControls wizard. If I apply a change to the XAML and press F5 / Build and Launch / Launch the emulator or Device it won't reflect the changes I did. In order to make the changes show, I have to either Clean or Rebuild the project before launching it.

This doesn't seem to happen with an empty project (C# / WP8) without Telerik, but the same problem happened also in the past in other projects, possibly it might be linked to referincing DLLs, but it doesn't always happen when referencing DLLs either (SQLite didn't seem to cause issues in another previous project).

Browsing the net I tried all the steps provided in what I found on StackOverflow and other websites:

  1. Tools >> Options >> Project and Solution >> Build and Run >> Check that "On run, when projects are out of date" is set to "Always build" or "Prompt to build"

  2. Build >> Configuration Manager >> Check that "Build" is checked for all of the projects you want to build for each of the configurations you need to use.

  3. I tried Setting the Build option's platform to Any CPU / x86 / ARM but the result is always the same

This is extremely annoying because I am unable to code & see the effects, and sometimes I don't know if something is working or not cause of this.

If I had to take a guess it might be something related to the references added by Telerik (in this case), but I am really at a loss of solutions.

like image 550
Saverio Terracciano Avatar asked Sep 13 '13 00:09

Saverio Terracciano


2 Answers

It seems that when you create a Windows Phone application project that has an empty space in its name (as example "The Project"), Visual Studio breaks and does not correctly track the changes in the project files to invalidate them when building.

like image 124
Saverio Terracciano Avatar answered Nov 15 '22 18:11

Saverio Terracciano


I just had this issue and after checking kinds of settings and configurations what finally fixed the issue was I:

  • Switch to Release mode and ran the application. Everything rebuilt and worked fine.
  • Then switched back to Debug mode and ran the application and everything was back to normal.

My only guess is that somehow Visual Studio 2012 got stuck in an incorrect state and this forced a refresh.

like image 26
MoMo Avatar answered Nov 15 '22 19:11

MoMo