本文介绍了Visual Studio 2010中不重建改变了code,除非我手动选取[重建"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去一周左右的时间,我已经注意到,Visual Studio 2010中不重新编译code,除非我把它强制。这是一个C#4.0项目与WPF。我打了F5,这似乎是它使用的重建,如果code发生了变化,然后启动应用程序。相反,它现在说左下方状态栏构建成功,并启动应用程序。实际上它并不重建应用程序,虽然。我可以告诉大家,因为:

In the past week or so, I've noticed that Visual Studio 2010 is not recompiling code unless I force it to. This is a C# 4.0 project with WPF. I hit F5, which seems like it used rebuild, if the code had changed, and then launch the app. Instead, it now says in the bottom left status bar "Build Successful" and launches the application. It doesn't actually rebuild the app, though. I can tell because:


  1. 即使我做大量更改,它编译非常迅速和

  2. 如果我尝试设置一个断点,它给人的警告,code已经改变,不
    设置断点。

这会发生,无论是否有在code错误或者没有,所以我不相信它就是它,如果构建失败将启动一个旧版本的东西。

This happens regardless of whether there are errors in the code or not, so I don't believe it's the thing where it launches an older version if the build fails.

如果我不是从菜单中选择重建项目中,即可工作。这种阻碍我平时的工作流程,但是。我半经常忘记这样做,然后再花10分钟试图找出到底是什么毛病我的变化。更糟的是,有时也有建,我不马上发现错误。

If I instead select from the menu to rebuild the project, it then works. This kind of impedes my usual workflow, however. I semi-frequently forget to do this, and then spend 10 minutes trying to figure out what the hell is wrong with my changes. Even worse, sometimes there are build errors that I don't notice right away.

pressing F6 重建的解决方案,没有做任何事。也许我已经与打乱哪些设置会导致这种行为?

Pressing F6 to "rebuild" the solution does not do anything either. What settings might I have mucked with that would cause this behavior?

推荐答案

尔加,我想通了这一点。这自然是一件傻事一个过于深夜后生成设置乱搞时,我做到了。下面是要检查的事情:

Gah, I figured this out. It was naturally something stupid I did when messing around with build settings after a too-late night. Here are the things to check:


  1. 工具>>选项>>项目和解决方案>>生成和运行>>检查上运行,当项目是过时的设置为始终打造或提示打造

  2. 构建>>配置管理>>检查构建被选中所有要建立为每个需要使用配置的项目。

这篇关于Visual Studio 2010中不重建改变了code,除非我手动选取[重建"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 08:32