Visual Studio 项目已过期 [英] Visual Studio Project out of date

查看:30
本文介绍了Visual Studio 项目已过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试让 Visual C++ 工作,但是在构建每个项目时我都收到此错误:此项目已过期"您要构建它吗?"每次都无法构建.

I've been trying to get Visual C++ working, but I'm getting this error when building every project: "This project is out of date" "Would you like to build it?" It fails to build every time.

当我重建时,构建仍然失败,尽管在记录器中我没有注意到任何错误消息,这让我认为它没有正确记录(我正在使用第三方程序来记录).

When I rebuild, the build still fails, although in the logger I don't notice any error messages, which makes me think its not logging properly (I'm using a third party program to log).

我已按照此处的一些说明进行操作:http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx 并启用日志记录.

I've followed some of the instructions here: http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx and enabled logging.

我收到此错误:项目不是最新的,因为在此处插入文件名".lastbuildstate 丢失.请注意,在实际的 Visual Studio 中,没有记录任何内容.我无法在谷歌中找到任何关于此的内容.可能是我错误地启用了日志记录,但我觉得这是错误.

I'm getting this error: project not up to date because "insert file name here".lastbuildstate is missing. Note that in actual visual studio, there is nothing logged. I was unable to find anything on this in google. It may be that I incorrectly enabled logging, but I feel that this is the error.

推荐答案

你应该让 Visual Studio 告诉你为什么它需要重建.Visual Studio 2015 已内置对此的支持:

You should let Visual Studio tell you why it needs to rebuild. Visual Studio 2015 has built in support for this:

  • 工具(菜单)
  • 选项
  • 项目和解决方案
  • 构建和运行

将 MSBuild 项目构建输出详细程度更改为 详细 或诊断.

Change MSBuild project build output verbosity to Detailed or Diagnostics.

在我的例子中,它打印了一条这样的消息:

In my case it printed a message like this:

1>------ Up-To-Date check: Project: xyz, Configuration: xyz ------
1>Project not up to date because build input 'C:wsMissing.h' is missing.

...并从项目中删除该标题解决了问题.

... and removing that header from the project fixed the problem.

要在较旧的 Visual Studio 版本中获取此信息,您需要使用 DebugView 并修改 devenv.exe.config(请参阅 Colin Smith 的回答:https://stackoverflow.com/a/21759835/1941779).请注意,此解决方案不适用于 Visual Studio 2015.

To get this information in older Visual Studio versions, you need to use DebugView and modify devenv.exe.config (see Colin Smith's answer: https://stackoverflow.com/a/21759835/1941779). Note that this solution does NOT work for Visual Studio 2015.

这篇关于Visual Studio 项目已过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆