[英]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. 我偶然发现了Visual Studio 2012的一个非常烦人的问题。场景:我正在使用
Telerik RedControls
向导在C#中开发Windows Phone 8应用程序。 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. 如果我对XAML进行更改,然后按
F5
/ Build and Launch
/启动仿真器或设备,它将无法反映我所做的更改。 In order to make the changes show, I have to either Clean
or Rebuild
the project before launching it. 为了显示所做的更改,我必须在启动项目之前
Clean
或Rebuild
项目。
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). 没有Telerik的空项目(C#/ WP8)似乎不会发生这种情况,但是过去在其他项目中也发生了相同的问题,可能是它与引用的DLL链接在一起,但是在引用时并不总是发生要么是DLL(SQLite似乎没有在另一个先前的项目中引起问题)。
Browsing the net I tried all the steps provided in what I found on StackOverflow and other websites: 浏览网络时,我尝试了在StackOverflow和其他网站上找到的所有步骤:
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"
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.
I tried Setting the Build option's platform to Any CPU / x86 / ARM
but the result is always the same 我尝试将Build选项的平台设置为
Any CPU / x86 / ARM
但结果始终相同
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. 如果我不得不猜测,可能与Telerik添加的参考文献有关(在这种情况下),但是我真的很茫然。
看起来,当您创建一个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: 我只是遇到了这个问题,在检查了各种设置和配置后,终于解决了这个问题的是我:
Release
mode and ran the application. Release
模式并运行该应用程序。 Everything rebuilt and worked fine. Debug
mode and ran the application and everything was back to normal. Debug
模式并运行该应用程序,一切恢复正常。 My only guess is that somehow Visual Studio 2012 got stuck in an incorrect state and this forced a refresh. 我唯一的猜测是,Visual Studio 2012以某种方式陷入了错误状态,这迫使刷新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.