简体   繁体   中英

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.

看起来,当您创建一个Windows Phone应用程序项目时,该项目的名称中会有一个空白(例如“ The Project”),Visual Studio会中断并且无法正确跟踪项目文件中的更改以使它们在构建时无效。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM