简体   繁体   English

除非我先清理/重建解决方案,否则Visual Studio 2012不会应用更改

[英]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. 为了显示所做的更改,我必须在启动项目之前CleanRebuild项目。

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和其他网站上找到的所有步骤:

  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 我尝试将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: 我只是遇到了这个问题,在检查了各种设置和配置后,终于解决了这个问题的是我:

  • Switch to Release mode and ran the application. 切换到Release模式并运行该应用程序。 Everything rebuilt and worked fine. 一切都重建并正常工作。
  • Then switched back to 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.

相关问题 我需要重建整个解决方案以使Visual Studio Test Explorer注意到更改 - I need to rebuild my entire solution to get the Visual Studio Test Explorer to notice changes Visual Studio清洁解决方案不会删除所有已移动的dll /项目引用 - Visual Studio clean solution doesn't delete all dlls / project reference getting moved Visual Studio 2012调试器无法正常工作 - visual studio 2012 debugger doesn't work 在Visual Studio 2012上无法打开项目 - Project doesn't open on Visual Studio 2012 ZedGraph在Visual Studio 2012中不起作用 - ZedGraph doesn't works in Visual Studio 2012 Visual Studio 2005清洁解决方案 - Visual Studio 2005 Clean Solution 虽然我在解决方案资源管理器中有它们但不能使用文件夹[Visual Studio 2012] - Can't use folders although I have them in Solution Explorer [Visual Studio 2012] 解决方案在Visual Studio中不运行/构建/重建 - Solution doesnt run/build/rebuild in Visual Studio 是否可以在Visual Studio / C#中构建,重新构建其依赖项? 为什么有时需要使用清洁剂? - Does build in visual studio/c# , rebuild it's dependencies? Why do I need to use clean sometimes? 在Visual Studio中使用SQLCE进行调试之前先清理解决方案 - Clean solution before debugging in Visual Studio with SQLCE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM